답안 #963668

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
963668 2024-04-15T12:47:09 Z Trisanu_Das Ancient Machine 2 (JOI23_ancient2) C++17
37 / 100
81 ms 1992 KB
#include "ancient2.h"
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define FOR(i, x, y) for(ll i=x; i<y; i++)
#define FORNEG(i, x, y) for(ll i=x; i>y; i--)
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL)
 
 
std::string Solve(int N) {
  vector<int> a(502), b(502);
  a[500] = 500;
  b[500] = 500;
  a[501] = 501;
  b[501] = 501;
 
  string sus = "";
 
  FOR(i,0,500){
    FOR(j,0,500){
      if (j==i) a[j] = 500, b[j] = 501;
      else a[j] =j+1, b[j] = j+1;
    }
    ll ans = Query(502, a, b);
    if (ans==500) sus = sus + "0";
    else sus = sus + "1";
  }
 
  FOR(i,0,500){
    FOR(j,0,500){
      a[j] =j+1, b[j] = j+1;
      if (j==499) a[j] = 0, b[j] = 0;
      if (i==j){
        if (sus[j] == '0') b[j] = 501;
        else a[j] = 501;
      }
    }
    ll ans = Query(502, a, b);
    if (ans<500){
      if (sus[i] == '0') sus = sus + "0";
      else sus = sus + "1";
    }else{
      if (sus[i] == '0') sus = sus + "1";
      else sus = sus + "0";
    }
  }
  return sus;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 72 ms 1460 KB Output is partially correct
2 Partially correct 73 ms 988 KB Output is partially correct
3 Partially correct 75 ms 720 KB Output is partially correct
4 Partially correct 72 ms 1468 KB Output is partially correct
5 Partially correct 72 ms 1200 KB Output is partially correct
6 Partially correct 78 ms 980 KB Output is partially correct
7 Partially correct 73 ms 980 KB Output is partially correct
8 Partially correct 71 ms 1204 KB Output is partially correct
9 Partially correct 81 ms 1208 KB Output is partially correct
10 Partially correct 72 ms 1220 KB Output is partially correct
11 Partially correct 74 ms 948 KB Output is partially correct
12 Partially correct 76 ms 1244 KB Output is partially correct
13 Partially correct 72 ms 1216 KB Output is partially correct
14 Partially correct 75 ms 984 KB Output is partially correct
15 Partially correct 75 ms 1208 KB Output is partially correct
16 Partially correct 71 ms 1224 KB Output is partially correct
17 Partially correct 71 ms 972 KB Output is partially correct
18 Partially correct 73 ms 1960 KB Output is partially correct
19 Partially correct 71 ms 1228 KB Output is partially correct
20 Partially correct 72 ms 724 KB Output is partially correct
21 Partially correct 74 ms 980 KB Output is partially correct
22 Partially correct 72 ms 1472 KB Output is partially correct
23 Partially correct 72 ms 1224 KB Output is partially correct
24 Partially correct 73 ms 1452 KB Output is partially correct
25 Partially correct 79 ms 1216 KB Output is partially correct
26 Partially correct 72 ms 720 KB Output is partially correct
27 Partially correct 75 ms 980 KB Output is partially correct
28 Partially correct 73 ms 1480 KB Output is partially correct
29 Partially correct 72 ms 964 KB Output is partially correct
30 Partially correct 72 ms 1236 KB Output is partially correct
31 Partially correct 81 ms 1700 KB Output is partially correct
32 Partially correct 75 ms 1480 KB Output is partially correct
33 Partially correct 72 ms 964 KB Output is partially correct
34 Partially correct 76 ms 1200 KB Output is partially correct
35 Partially correct 73 ms 1468 KB Output is partially correct
36 Partially correct 76 ms 996 KB Output is partially correct
37 Partially correct 72 ms 1196 KB Output is partially correct
38 Partially correct 74 ms 728 KB Output is partially correct
39 Partially correct 79 ms 1460 KB Output is partially correct
40 Partially correct 73 ms 1992 KB Output is partially correct
41 Partially correct 74 ms 1192 KB Output is partially correct
42 Partially correct 73 ms 1464 KB Output is partially correct
43 Partially correct 79 ms 1708 KB Output is partially correct
44 Partially correct 72 ms 1456 KB Output is partially correct
45 Partially correct 71 ms 1208 KB Output is partially correct
46 Partially correct 75 ms 1228 KB Output is partially correct
47 Partially correct 72 ms 1744 KB Output is partially correct
48 Partially correct 74 ms 728 KB Output is partially correct
49 Partially correct 77 ms 1212 KB Output is partially correct
50 Partially correct 72 ms 1444 KB Output is partially correct
51 Partially correct 72 ms 968 KB Output is partially correct
52 Partially correct 72 ms 1712 KB Output is partially correct
53 Partially correct 73 ms 976 KB Output is partially correct
54 Partially correct 74 ms 1212 KB Output is partially correct
55 Partially correct 72 ms 1456 KB Output is partially correct
56 Partially correct 76 ms 1216 KB Output is partially correct
57 Partially correct 73 ms 1220 KB Output is partially correct
58 Partially correct 73 ms 1464 KB Output is partially correct
59 Partially correct 71 ms 708 KB Output is partially correct
60 Partially correct 75 ms 1252 KB Output is partially correct
61 Partially correct 72 ms 980 KB Output is partially correct
62 Partially correct 72 ms 964 KB Output is partially correct
63 Partially correct 77 ms 1888 KB Output is partially correct