Submission #1107696

#TimeUsernameProblemLanguageResultExecution timeMemory
1107696ozner77Parachute rings (IOI12_rings)C++17
0 / 100
121 ms262144 KiB
#include <bits/stdc++.h> using namespace std; vector<vector<long long>> V; vector<long long> sumas; void Init(int N){ vector<long long> V1(N,0); for(int i=0;i<N;i++){ V.push_back(V1); } } void Link(int A,int B){ V[A][B]=1; V[B][A]=1; sumas[A]++; sumas[B]++; } int CountCritical(){ int critical=0; long long jaja=V.size(); for(int i=0;i<jaja;i++){ bool es=true; for(int j=0;j<jaja;j++){ if(i!=j){ if(V[j][i]==1){ if(sumas[j]-1>2){ es=false; break; } }else{ if(sumas[j]>2){ es=false; break; } } } } if(es){ critical++; } } return critical; }
#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...