Submission #19559549
Source Code Expand
Copy
#include<bits/stdc++.h> using namespace std; using ll = int64_t; using LL = uint64_t; typedef vector<ll>VI; typedef pair<ll,ll>P; #define VV(T) vector<vector<T>> #define sz(x) int(x.size()) #define rep(i, n) for (int i = 0; i < (int)n; i++) #define ALL(a) (a).begin(),(a).end() #define rALL(a) (a).rbegin(),(a).rend() #define c_max(a,b) (((ll)a)>((ll)b)?(a):(b)) #define c_min(a,b) (((ll)a)<((ll)b)?(a):(b)) #define vmax(v) *max_element(ALL(v)) #define vmin(v) *min_element(ALL(v)) #define $(x) {cout<<#x<<" = " <<(x)<<endl;} #define fi first #define se second #define MAX 100100 #define MAX6 1001001 #define MAX7 10010010 #define INF 1<<30 #define INFTY 1LL<<61 #define MAX_INT INT_MAX #define MAX_LL LLONG_MAX #define CLR(mat) memset(mat, 0, sizeof(mat)) template<class T, class U> inline bool chmax(T& a, U b) { if (a < b) { a = b; return 1; } return 0; } template<class T, class U> inline bool chmin(T& a, U b) { if (a > b) { a = b; return 1; } return 0; } #define MOD 1000000007 //const ll inf=1e18; //const int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1}; // vector型から重複を削除 list.erase(unique(ALL(list)),list.end()); // g++ -o a a.cpp -Wall -lm -std=c++17 //push_back -> emplace_back const ll M = 10000000000; int main(){ int N;cin>>N; string T;cin>>T; bool flag; ll ans = 0; rep(i, 3) { flag = true; rep(j,N){ char s = ((i+j)%3==2 ? '0' : '1'); cout<<s<<endl; flag &= (T[j] == s); } if(flag){ ans += M-N/3; } } cout<<ans<<endl; }
Submission Info
Submission Time | |
---|---|
Task | B - Many 110 |
User | Neccolini |
Language | C++ (GCC 9.2.1) |
Score | 0 |
Code Size | 1581 Byte |
Status | WA |
Exec Time | 776 ms |
Memory | 3756 KB |
Judge Result
Set Name | All | Sample | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 400 | 0 / 0 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
All | sample_01.txt, sample_02.txt, testcase_1.txt, testcase_10.txt, testcase_11.txt, testcase_12.txt, testcase_13.txt, testcase_14.txt, testcase_15.txt, testcase_16.txt, testcase_17.txt, testcase_18.txt, testcase_19.txt, testcase_2.txt, testcase_20.txt, testcase_21.txt, testcase_22.txt, testcase_23.txt, testcase_24.txt, testcase_25.txt, testcase_26.txt, testcase_27.txt, testcase_28.txt, testcase_29.txt, testcase_3.txt, testcase_30.txt, testcase_4.txt, testcase_5.txt, testcase_6.txt, testcase_7.txt, testcase_8.txt, testcase_9.txt |
Sample | sample_01.txt, sample_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | WA | 8 ms | 3576 KB |
sample_02.txt | WA | 2 ms | 3556 KB |
testcase_1.txt | WA | 3 ms | 3596 KB |
testcase_10.txt | WA | 3 ms | 3596 KB |
testcase_11.txt | WA | 2 ms | 3592 KB |
testcase_12.txt | WA | 2 ms | 3416 KB |
testcase_13.txt | WA | 2 ms | 3412 KB |
testcase_14.txt | WA | 2 ms | 3496 KB |
testcase_15.txt | WA | 776 ms | 3756 KB |
testcase_16.txt | WA | 766 ms | 3700 KB |
testcase_17.txt | WA | 771 ms | 3716 KB |
testcase_18.txt | WA | 243 ms | 3668 KB |
testcase_19.txt | WA | 153 ms | 3584 KB |
testcase_2.txt | WA | 2 ms | 3552 KB |
testcase_20.txt | WA | 198 ms | 3660 KB |
testcase_21.txt | WA | 523 ms | 3728 KB |
testcase_22.txt | WA | 403 ms | 3612 KB |
testcase_23.txt | WA | 43 ms | 3648 KB |
testcase_24.txt | WA | 628 ms | 3728 KB |
testcase_25.txt | WA | 647 ms | 3680 KB |
testcase_26.txt | WA | 642 ms | 3616 KB |
testcase_27.txt | WA | 544 ms | 3700 KB |
testcase_28.txt | WA | 250 ms | 3664 KB |
testcase_29.txt | WA | 31 ms | 3644 KB |
testcase_3.txt | WA | 3 ms | 3628 KB |
testcase_30.txt | WA | 118 ms | 3616 KB |
testcase_4.txt | WA | 2 ms | 3632 KB |
testcase_5.txt | WA | 3 ms | 3432 KB |
testcase_6.txt | WA | 2 ms | 3592 KB |
testcase_7.txt | WA | 2 ms | 3628 KB |
testcase_8.txt | WA | 8 ms | 3592 KB |
testcase_9.txt | WA | 3 ms | 3496 KB |