結果
| 問題 |
No.1943 消えたAGCT(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-30 23:10:50 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 453 bytes |
| コンパイル時間 | 3,427 ms |
| コンパイル使用メモリ | 272,760 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2025-04-30 23:10:56 |
| 合計ジャッジ時間 | 5,395 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 WA * 7 |
コンパイルメッセージ
main.cpp:17:36: warning: multi-character character constant [-Wmultichar]
17 | if (S[i] == 'A' || S[i] == ' G' || S[i] == 'C' || S[i] == 'T') ans = i + 1;
| ^~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i)
#define all(a) (a).begin(),(a).end()
int main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
int N;
string S;
cin >> N >> S;
int ans = 0;
rep(i, 0, N) {
if (S[i] == 'A' || S[i] == ' G' || S[i] == 'C' || S[i] == 'T') ans = i + 1;
}
cout << ans << '\n';
}