結果
問題 | No.1943 消えたAGCT(1) |
ユーザー |
![]() |
提出日時 | 2023-05-02 23:06:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 315 bytes |
コンパイル時間 | 578 ms |
コンパイル使用メモリ | 66,964 KB |
実行使用メモリ | 13,640 KB |
最終ジャッジ日時 | 2024-11-21 10:51:24 |
合計ジャッジ時間 | 38,747 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 TLE * 12 |
ソースコード
#include <iostream>using namespace std;int main() {int n;string s;cin >>n>>s;int c;int ans=0;do{c=0;for(int i=0;i<s.size();i++){if(s[i]=='A' or s[i]=='G' or s[i]=='C' or s[i]=='T') c++;}if(c>0){s=s.substr(0,c-1)+s.substr(c);ans++;}} while(c>0);cout<<ans<<endl;return 0;}