Submission #35976

# Submission time Handle Problem Language Result Execution time Memory
35976 2017-12-04T04:03:21 Z funcsr Pipes (CEOI15_pipes) C++14
0 / 100
3363 ms 65536 KB
#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

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 time Memory Grader output
1 Incorrect 4 ms 3456 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 3584 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 152 ms 11180 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 285 ms 14052 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 566 ms 23664 KB Memory limit exceeded (if you are sure your verdict is not MLE, please contact us)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1108 ms 25272 KB Memory limit exceeded (if you are sure your verdict is not MLE, please contact us)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1826 ms 45908 KB Memory limit exceeded (if you are sure your verdict is not MLE, please contact us)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2464 ms 58252 KB Memory limit exceeded (if you are sure your verdict is not MLE, please contact us)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2976 ms 59764 KB Memory limit exceeded (if you are sure your verdict is not MLE, please contact us)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3363 ms 65536 KB Execution killed with signal 9 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -