# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
897907 | 2024-01-04T03:34:53 Z | Sir_Ahmed_Imran | 동굴 (IOI13_cave) | C++17 | 474 ms | 600 KB |
///~~~LOTA~~~/// #include "cave.h" #include <bits/stdc++.h> using namespace std; #define nl '\n' #define ff first #define ss second #define ll long long #define append push_back #define pii pair<int,int> #define all(x) (x).begin(),(x).end() mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int ran(){ ll o=rng(); o%=2; o=(o+2)%2; return o; } void exploreCave(int n){ int m,o,p,q,r,s[n],t[n],d[n]; for(int i=0;i<n;i++) s[i]=d[i]=-1; m=0; while(m<n){ for(int j=0;j<1028;j++){ for(int i=0;i<n;i++) if(d[i]<0) s[i]=ran(); o=tryCombination(s); if(o>=m){ m=o; for(int i=0;i<n;i++) t[i]=s[i]; } if(o==-1){ m=n; for(int i=0;i<n;i++) t[i]=s[i]; } } for(int i=0;i<n;i++){ if(d[i]>=0) continue; s[i]=t[i]; t[i]^=1; o=tryCombination(t); if(o==-1) o=n; if(o<m) d[i]=o; t[i]^=1; } } answer(t,d); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 450 ms | 544 KB | too much calls on tryCombination() |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 474 ms | 564 KB | too much calls on tryCombination() |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 5 ms | 348 KB | Output is correct |
6 | Correct | 5 ms | 348 KB | Output is correct |
7 | Correct | 5 ms | 348 KB | Output is correct |
8 | Correct | 5 ms | 348 KB | Output is correct |
9 | Correct | 5 ms | 348 KB | Output is correct |
10 | Correct | 5 ms | 344 KB | Output is correct |
11 | Correct | 6 ms | 348 KB | Output is correct |
12 | Correct | 5 ms | 348 KB | Output is correct |
13 | Correct | 5 ms | 348 KB | Output is correct |
14 | Correct | 1 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 5 ms | 348 KB | Output is correct |
6 | Correct | 5 ms | 348 KB | Output is correct |
7 | Correct | 5 ms | 348 KB | Output is correct |
8 | Correct | 5 ms | 348 KB | Output is correct |
9 | Correct | 5 ms | 348 KB | Output is correct |
10 | Correct | 5 ms | 344 KB | Output is correct |
11 | Correct | 6 ms | 348 KB | Output is correct |
12 | Correct | 5 ms | 348 KB | Output is correct |
13 | Correct | 5 ms | 348 KB | Output is correct |
14 | Correct | 1 ms | 348 KB | Output is correct |
15 | Correct | 1 ms | 600 KB | Output is correct |
16 | Correct | 0 ms | 348 KB | Output is correct |
17 | Correct | 1 ms | 348 KB | Output is correct |
18 | Correct | 1 ms | 348 KB | Output is correct |
19 | Correct | 6 ms | 348 KB | Output is correct |
20 | Incorrect | 365 ms | 484 KB | too much calls on tryCombination() |
21 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 450 ms | 544 KB | too much calls on tryCombination() |
2 | Halted | 0 ms | 0 KB | - |