Submission #575161

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5751612022-06-09 19:39:42toloraiaReconstruction Project (JOI22_reconstruction)C++14
100 / 100
3509 ms54164 KiB
#include <bits/stdc++.h>
#define int long long
#define F first
#define S second
#define pb push_back
using namespace std;
const int N = 100005;
int n, m;
pair < int, pair < int, int > > P[N];
vector < int > g[505];
void del (int x, int y){
for (int i = 0; i < g[x].size(); i++){
if (g[x][i] == y){
swap (g[x][i], g[x].back());
g[x].pop_back();
break;
}
}
}
int G[505][505];
int par[505];
void dfs (int k, int p){
par[k] = p;
for (int to : g[k])
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

reconstruction.cpp: In function 'void del(long long int, long long int)':
reconstruction.cpp:16:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |     for (int i = 0; i < g[x].size(); i++){
      |                     ~~^~~~~~~~~~~~~
reconstruction.cpp: At global scope:
reconstruction.cpp:40:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   40 | main() {
      | ^~~~
reconstruction.cpp: In function 'int main()':
reconstruction.cpp:118:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  118 |             int mid = l + r >> 1;
      |                       ~~^~~
reconstruction.cpp:127:29: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  127 |             int mid = l + r + 1 >> 1;
      |                       ~~~~~~^~~
reconstruction.cpp:144:29: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  144 |             int mid = l + r + 1 >> 1;
      |                       ~~~~~~^~~
#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...