# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1029467 | 2024-07-20T23:00:07 Z | vjudge1 | CATS (NOI14_cats) | C++17 | 1500 ms | 1528 KB |
#include "bits/stdc++.h" using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); long long q, x, l, n; cin>>q; vector<int> Patronear; long long Cos = 32; long long Contador = Cos; bool Seguir = 1; while(q--){ cin>>x>>l>>n; long long xx = x; long long ll = l; long long nn = n; vector<long long> s1(222, 0); vector<long long> s2(222, 0); while(x > 0){ /*cout<<s1.back()<<" "; cout<<s1[s1.size() - 2]<<" "; cout<<s1[s1.size() - 3]<<" "; cout<<s1[s1.size() - 4]<<"\n"; cout<<s2.back()<<" "; cout<<s2[s2.size() - 2]<<" "; cout<<s2[s2.size() - 3]<<" "; cout<<s2[s2.size() - 4]<<"\n"; cout<<"\n";*/ s2.push_back(s1.back()); s1.pop_back(); for(long long i = 0; i < s1.size(); i++) s1[i] ^= 1; /*cout<<s1.back()<<" "; cout<<s1[s1.size() - 2]<<" "; cout<<s1[s1.size() - 3]<<" "; cout<<s1[s1.size() - 4]<<"\n"; cout<<s2.back()<<" "; cout<<s2[s2.size() - 2]<<" "; cout<<s2[s2.size() - 3]<<" "; cout<<s2[s2.size() - 4]<<"\n"; cout<<"\n";*/ if(s2.back() > l){ x--; /*cout<<s2.back()<<" "; Contador--; //if(Seguir) cout<<s2.back() % 2<<", "; if(Contador == 0){ cout<<"\n"; Contador = Cos; Seguir = 0; }*/ if(x == 0) cout<<s2.back()<<"\n"; //Patronear.push_back(s2.back()); } else { s2.push_back(n); s2.push_back(n); long long Suma = s2.back(); s2.pop_back(); Suma += s2.back(); s2.back() = Suma; Suma = s2.back(); s2.pop_back(); Suma += s2.back(); s2.back() = Suma; s1.push_back(s2.back()); s1.push_back(s2.back()); s2.pop_back(); s2.pop_back(); } } } /*for(long long i = 0; i < Patronear.size(); i++){ vector<int> Intento; long long j = 0; for(; j < i + 1; j++){ Intento.push_back(Patronear[j]); } bool Joya = 1; while(j < Patronear.size()){ long long k; for(k = 0; k < i + 1 and k < Patronear.size(); k++){ if(Intento[k] != Patronear[k + j]){ Joya = 0; break; } } j = k + 1; } if(Joya) cout<<i + 1; if(Joya) break; }*/ return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 604 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 0 ms | 604 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 604 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1578 ms | 756 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 128 ms | 1528 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 113 ms | 1460 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |