結果
| 問題 |
No.2276 I Want AC
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2023-06-05 09:37:23 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 362 ms / 2,000 ms |
| コード長 | 167 bytes |
| コンパイル時間 | 389 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2024-12-29 05:49:10 |
| 合計ジャッジ時間 | 15,441 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 56 |
ソースコード
I=input S=I() S=I() A=C=a=n=0 L='A' for s in S: if s==L:A+=1 else:C,n=C+1,n+A c=C m=n for s in S: if s<L:n,a,c=n+c-1-a,a+1,c-1 c-=s>L a+=s==L m=max(n,m) print(m)