Skip to content

Commit

Permalink
Update correct.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoYuKai-SaMuEl authored Sep 24, 2024
1 parent ff28a25 commit d8cc6e2
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions pB/solution/correct.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include<bits/stdc++.h>
using namespace std;
int way[105],t[15],a[105][15],b[105][15],c[105][15],x[105][15][15];
int way[105],t[15],a[105][15],b[105][15],c[105][15],x[105][15][15],y[105][15][15],z[105][15][15],in[105][15];
long long int dis[105][15];
vector<pair<int,int>>out[105];
int main(){
int n,m;
cin>>n>>m;
Expand All @@ -9,7 +11,18 @@ int main(){
for(int i=1;i<=n;i++){
for(int j=1;j<=way[i];j++){
cin>>a[i][j];
for(int k=1;k<=a[i][j];k++)cin>>x[i][j][k];
for(int k=1;k<=a[i][j];k++)cin>>x[i][j][k]>>y[i][j][k];
cin>>b[i][j];
for(int k=1;k<=b[i][j];k++)cin>>z[i][j][k];
cin>>c[i][j];
}
}
}
for(int p=0;p<(1<<m);p++){
for(int i=1;i<=n;i++)for(int j=1;j<=way[i];j++){
dis[i][j]=1e15;
in[i][j]=a[i][j];
for(int k=1;k<=b[i][j];k++)if(~p&(1<<(z[i][j][k]-1)))in[i][j]++;

}
}
}

0 comments on commit d8cc6e2

Please sign in to comment.