提出 #46061446


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

void f(){
	
}

signed main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;cin>>n;
	string s;cin>>s;
	const char* kk=s.c_str();
	const char* k=strstr(kk,"ABC");
	if(k==nullptr)
		cout<<-1;
	else
		cout<<k-kk+1;
}

提出情報

提出日時
問題 A - First ABC 2
ユーザ yijw0930
言語 C++ 17 (gcc 12.2)
得点 100
コード長 305 Byte
結果 AC
実行時間 1 ms
メモリ 3596 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 11
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 02_min_00.txt, 03_max_00.txt, 03_max_01.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3376 KiB
00_sample_01.txt AC 1 ms 3464 KiB
00_sample_02.txt AC 1 ms 3460 KiB
01_random_00.txt AC 1 ms 3440 KiB
01_random_01.txt AC 1 ms 3468 KiB
01_random_02.txt AC 1 ms 3464 KiB
01_random_03.txt AC 1 ms 3512 KiB
01_random_04.txt AC 1 ms 3384 KiB
02_min_00.txt AC 1 ms 3448 KiB
03_max_00.txt AC 1 ms 3596 KiB
03_max_01.txt AC 1 ms 3476 KiB