結果
| 問題 |
No.559 swapAB列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-17 20:03:16 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 277 bytes |
| コンパイル時間 | 1,516 ms |
| コンパイル使用メモリ | 166,856 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-25 08:53:00 |
| 合計ジャッジ時間 | 2,037 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 3 WA * 4 |
ソースコード
#include<bits/stdc++.h>
#define rep(i,a,n) for (int i = a;i < n;i++)
using namespace std;
int main() {
int ans=0,c=0;
string s; cin >> s;
rep(i,0,s.size()){
if(s[i] == 'A'){
ans = i-c;
c++;
}
}
cout << ans << endl;
}