Submission #35976

#TimeUsernameProblemLanguageResultExecution timeMemory
35976funcsrPipes (CEOI15_pipes)C++14
0 / 100
3363 ms65536 KiB
#include <bitset> #include <cassert> #include <vector> #define rep(i, n) for (int i=0; i<(n); i++) #define INF 1145141919 #define pb push_back using namespace std; int N, M; vector<int> G[100000]; int R[100000]; int U[17][100000]; void dfs(int x, int p, int r) { R[x] = r; U[0][x] = p; for (int t : G[x]) { if (t == p) continue; dfs(t, x, r+1); } } signed main() { auto f = fopen("/dev/stdin", "r"); fscanf(f, "%d %d", &N, &M); auto backward = new bitset<6000000>(); rep(i, M) { int u, v; fscanf(f, "%d %d", &u, &v); u--, v--; G[u].pb(v); G[v].pb(u); } printf("1\n"); return 0; }

Compilation message (stderr)

pipes.cpp: In function 'int main()':
pipes.cpp:26:8: warning: unused variable 'backward' [-Wunused-variable]
   auto backward = new bitset<6000000>();
        ^~~~~~~~
pipes.cpp:25:9: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   fscanf(f, "%d %d", &N, &M);
   ~~~~~~^~~~~~~~~~~~~~~~~~~~
pipes.cpp:29:11: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     fscanf(f, "%d %d", &u, &v);
     ~~~~~~^~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...