제출 #582652

#제출 시각아이디문제언어결과실행 시간메모리
582652MadokaMagicaFanUnscrambling a Messy Bug (IOI16_messy)C++14
0 / 100
1 ms300 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using pi = pair<int,int>; #define all(v) v.begin(),v.end() #define sort(v) sort(all(v)) #define endl '\n' #define forn(i,n) for(int i = 0; i < n; ++i) #define forbe(i,b,e) for(int i = b; i < e; ++i) #define forr(i,n) for(int i = n-1; i >= 0; --i) #define sz(v) ((int)v.size()) #define pb push_back #define f first #define s second void add_element(std::string x); bool check_element(std::string x); void compile_set(); std::vector<int> sub12(int n) { string x; forn(i,n) x.pb('0'); forn(i,n) { x[i] = '1'; add_element(x); } compile_set(); vector<bool> fnd(n); vi perm(n); forn(i,n) x[i] = '0'; forn(i,n) { forn(j,n) { if (fnd[j]) continue; x[j] = '1'; if (check_element(x)) { fnd[j] = 1; perm[i] = j; continue; } x[j] = '0'; } } return perm; } std::vector<int> restore_permutation(int n, int w, int r) { if (n == 8) return sub12(n); else if (n == 32 && r == 1024) return sub12(n); vi ans; return ans; } #ifdef ONPC void add_element(std::string x) {} bool check_element(std::string x) {return 1;} void compile_set() {} void solve() { int n, k, d; cin >> n; cout << n << endl; k = 0; forn(i,n) { cin >> d; cout << d << ' '; k += d; } cout << endl << k << endl; } int main() { // freopen("in", "r", stdin); // ios_base::sync_with_stdio(0);cin.tie(0); solve(); } #endif
#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...