Submission #7066929
Source Code Expand
#include <bits/stdc++.h> using namespace std; typedef long long ll; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } #define all(x) (x).begin(),(x).end() #define pll pair<ll,ll> #define rep(i,n) for(int i=0;i<n;i++) const ll INF = 1LL<<60; const ll mod = (int)1e9 + 7; int main() { //ll N; cin >> N; //ll N,M; cin >> N >> M; string S; cin >> S; //ll H,W; cin >> H >> W; int N=S.length(); for(int i=N-1;i>0;i--){ if(S[i]=='A' && S[i-1]=='W'){ S[i]=='C'; S[i-1]=='A'; } } cout << S << endl; } /* */
Submission Info
Submission Time | |
---|---|
Task | A - WAsedAC |
User | lucky_space |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 768 Byte |
Status | WA |
Exec Time | 4 ms |
Memory | 512 KB |
Judge Result
Set Name | All | ||||
---|---|---|---|---|---|
Score / Max Score | 0 / 100 | ||||
Status |
|
Set Name | Test Cases |
---|---|
All | 0-sample1, 0-sample2, 1-random-AW-small0, 1-random-AW-small1, 1-random-AW-small2, 1-random-AW-small3, 1-random-AW-small4, 1-random-AWC-small0, 1-random-AWC-small1, 1-random-AWC-small2, 1-random-AWC-small3, 1-random-AWC-small4, 2-random-AW-large0, 2-random-AW-large1, 2-random-AW-large2, 2-random-AW-large3, 2-random-AW-large4, 2-random-AWC-large0, 2-random-AWC-large1, 2-random-AWC-large2, 2-random-AWC-large3, 2-random-AWC-large4, 3-WWWA-large-0, 3-WWWA-large-1, 3-WWWA-large-2, 3-WWWA-large-3, 3-WWWA-large-4, 3-WWWA-large-5, 3-WWWA-large-6, 3-WWWA-large-7, 3-WWWA-large-8, 3-WWWA-large-9, 9-onecharacter-A, 9-onecharacter-W |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0-sample1 | WA | 1 ms | 256 KB |
0-sample2 | WA | 1 ms | 256 KB |
1-random-AW-small0 | WA | 1 ms | 256 KB |
1-random-AW-small1 | WA | 1 ms | 256 KB |
1-random-AW-small2 | WA | 1 ms | 256 KB |
1-random-AW-small3 | WA | 1 ms | 256 KB |
1-random-AW-small4 | WA | 1 ms | 256 KB |
1-random-AWC-small0 | WA | 1 ms | 256 KB |
1-random-AWC-small1 | WA | 1 ms | 256 KB |
1-random-AWC-small2 | WA | 1 ms | 256 KB |
1-random-AWC-small3 | WA | 1 ms | 256 KB |
1-random-AWC-small4 | WA | 1 ms | 256 KB |
2-random-AW-large0 | WA | 4 ms | 512 KB |
2-random-AW-large1 | WA | 4 ms | 512 KB |
2-random-AW-large2 | WA | 4 ms | 512 KB |
2-random-AW-large3 | WA | 4 ms | 512 KB |
2-random-AW-large4 | WA | 4 ms | 512 KB |
2-random-AWC-large0 | WA | 4 ms | 512 KB |
2-random-AWC-large1 | WA | 4 ms | 512 KB |
2-random-AWC-large2 | WA | 4 ms | 512 KB |
2-random-AWC-large3 | WA | 4 ms | 512 KB |
2-random-AWC-large4 | WA | 4 ms | 512 KB |
3-WWWA-large-0 | WA | 4 ms | 512 KB |
3-WWWA-large-1 | WA | 2 ms | 384 KB |
3-WWWA-large-2 | WA | 2 ms | 384 KB |
3-WWWA-large-3 | WA | 2 ms | 384 KB |
3-WWWA-large-4 | WA | 3 ms | 384 KB |
3-WWWA-large-5 | WA | 4 ms | 512 KB |
3-WWWA-large-6 | WA | 4 ms | 512 KB |
3-WWWA-large-7 | WA | 4 ms | 512 KB |
3-WWWA-large-8 | WA | 4 ms | 512 KB |
3-WWWA-large-9 | WA | 4 ms | 512 KB |
9-onecharacter-A | AC | 1 ms | 256 KB |
9-onecharacter-W | AC | 1 ms | 256 KB |