# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1005401 |
2024-06-22T12:02:35 Z |
vjudge1 |
Party (POI11_imp) |
C++17 |
|
3000 ms |
1884 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
int n,m;
vector<int>v[3005];
bitset<3005>curr,mat[3005],vis;
int cnt=0;
void rec(int x){
if(x==n/3){
for(int i=0;i<3005;i++){
if(curr[i]==1) co i<<' ';
}
exit(0);
}
int num=rand()%n+1;
while(vis[num]||(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;
}
# |
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 |
3075 ms |
604 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
604 KB |
Output is correct |
2 |
Correct |
30 ms |
892 KB |
Output is correct |
3 |
Correct |
30 ms |
856 KB |
Output is correct |
4 |
Execution timed out |
3041 ms |
856 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
600 KB |
Output is correct |
2 |
Correct |
73 ms |
1080 KB |
Output is correct |
3 |
Correct |
74 ms |
1108 KB |
Output is correct |
4 |
Correct |
74 ms |
1108 KB |
Output is correct |
5 |
Correct |
74 ms |
1068 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
22 ms |
860 KB |
Output is correct |
2 |
Execution timed out |
3053 ms |
1192 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
66 ms |
1112 KB |
Output is correct |
2 |
Correct |
132 ms |
1512 KB |
Output is correct |
3 |
Execution timed out |
3058 ms |
1244 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
120 ms |
1520 KB |
Output is correct |
2 |
Execution timed out |
3071 ms |
1372 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
162 ms |
1616 KB |
Output is correct |
2 |
Correct |
213 ms |
1616 KB |
Output is correct |
3 |
Correct |
244 ms |
1624 KB |
Output is correct |
4 |
Execution timed out |
3051 ms |
1616 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
205 ms |
1688 KB |
Output is correct |
2 |
Execution timed out |
3035 ms |
1876 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
235 ms |
1872 KB |
Output is correct |
2 |
Execution timed out |
3069 ms |
1876 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
297 ms |
1884 KB |
Output is correct |
2 |
Execution timed out |
3015 ms |
1624 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |