제출 #1074062

#제출 시각아이디문제언어결과실행 시간메모리
1074062beaconmcUnscrambling a Messy Bug (IOI16_messy)C++14
38 / 100
2 ms604 KiB
#include "messy.h" #include <bits/stdc++.h> typedef long long ll; #define FOR(i,x,y) for(ll i=x; i<y; i++) #define FORNEG(i,x,y) for(lli = x; i>y; i--) using namespace std; string sus(ll n, ll a, ll b){ string ans = ""; FOR(i,0,n){ if (i==a || i==b) ans += '1'; else ans += '0'; } return ans; } std::vector<int> restore_permutation(int n, int w, int r) { ll cur = n; FOR(i,0,n){ if (cur > 0){ add_element(sus(n, i, i)); } FOR(j,1,cur){ add_element(sus(n, i, i+j)); } cur-=2; } compile_set(); vector<int> ans; FOR(i,0,n){ ll temp = 0; FOR(j,0,n){ temp += check_element(sus(n, i, j)); } ans.push_back(n-temp); } return ans; }
#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...