Submission #574841

#TimeUsernameProblemLanguageResultExecution timeMemory
574841AJ00Connecting Supertrees (IOI20_supertrees)C++14
0 / 100
1 ms340 KiB
#include <bits/stdc++.h> #include "supertrees.h" using namespace std; int n; const int MOD = 1000000007; const int INF = 1e18; int construct (vector<vector<int>> p){ int n = p.size(); vector<vector<int>> b(n,vector<int>(n,0)); if (n == 1){ build(b); return 1; } for (int i = 0; i < n; i++){ if (i == 0){ b[i][1] = 1; } if (i == n-1){ b[i][n-2] = 1; } else { b[i][i-1] = 1; b[i][i+1] = 1; } } build(b); return 1; }

Compilation message (stderr)

supertrees.cpp:7:17: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
    7 | const int INF = 1e18;
      |                 ^~~~
#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...