結果
| 問題 | No.559 swapAB列 |
| コンテスト | |
| ユーザー |
ianlinathome
|
| 提出日時 | 2017-11-10 05:30:28 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 881µs | |
| コード長 | 273 bytes |
| 記録 | |
| コンパイル時間 | 78 ms |
| コンパイル使用メモリ | 39,704 KB |
| 実行使用メモリ | 9,840 KB |
| 最終ジャッジ日時 | 2026-09-29 03:35:03 |
| 合計ジャッジ時間 | 1,047 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include <stdio.h>
int main(){
int now=0,ans=0;
char c[1000000];
for(int i=0;i<1000000;i++)c[i]='\0';
scanf("%s",c);
for(int i=0;c[i]!='\0';i++){
if(c[i]=='A'){
ans+=i-now;
now++;
}
}
printf("%d\n",ans);
}
ianlinathome