# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1005400 | 2024-06-22T12:01:28 Z | vjudge1 | Party (POI11_imp) | C++17 | 3000 ms | 1628 KB |
#include <bits/stdc++.h> #define suiii ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ll long long #define co cout<< //#pragma GCC optimize("O3,Ofast,unroll-loops") //#pragma GCC target("avx2,sse3,sse4,avx") using namespace std; //stuff ll n,m; vector<ll>v[3005]; bitset<3005>curr,mat[3005],vis; ll cnt=0; void rec(ll x){ if(x==n/3){ for(int i=0;i<3005;i++){ if(curr[i]==1) co i<<' '; } exit(0); } ll num=rand()%n+1; while(vis[num]||v[num].size()<n/3-2||(curr&mat[num])!=curr) num=rand()%n+1; vis[num]=1; curr[num]=1; rec(x+1); curr[num]=0; vis[num]=0; } void solve(){ cin>>n>>m; for(int i=0;i<m;i++){ ll a,b; cin>>a>>b; mat[a][b]=1; mat[b][a]=1; } while(1) rec(0); co vis[5000]; } int main() { suiii int t=1; // cin>>t; while(t--){ solve(); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3032 ms | 344 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3061 ms | 348 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3040 ms | 600 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3062 ms | 604 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3056 ms | 860 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3017 ms | 856 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3024 ms | 1116 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3050 ms | 1372 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3059 ms | 1372 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3026 ms | 1368 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3047 ms | 1628 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |