結果
| 問題 |
No.1943 消えたAGCT(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-20 21:50:41 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 598 bytes |
| コンパイル時間 | 542 ms |
| コンパイル使用メモリ | 67,324 KB |
| 実行使用メモリ | 11,364 KB |
| 最終ジャッジ日時 | 2024-09-20 07:53:54 |
| 合計ジャッジ時間 | 4,180 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 TLE * 1 -- * 17 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#define rep(i,n) for(i=0; i<n; ++i)
#define in(a) cin >> a
#define out(a,b) cout << a << b
using namespace std;
using lint = long long;
int main(void){
int i, j, k, n, m, cnt = 0, sum = 1;
in(n);
string s,t="AGCT";
in(s);
while(sum){
sum=0;
k=s.size();
rep(i,k){
rep(j,4){
sum+=s[i]==t[j];
}
//out(sum,endl);
}
if(sum!=0) {s.erase(sum-1,1);
cnt++;}
else break;
}
out(cnt,endl);
return 0;
}