提出 #68153602


ソースコード 拡げる

    #include<bits/stdc++.h>
    using namespace std;
    static int n,l,r;
    int main() {
        cin >> n >> l >> r;
        string str;
        cin >> str;
        for(int i = l ; i < str.size() - r ; i ++) {
            cout << str[i];
        }
        return 0;
    }

提出情報

提出日時
問題 A - A Substring
ユーザ cslgZ09224220
言語 C++ 20 (gcc 12.2)
得点 100
コード長 285 Byte
結果 AC
実行時間 1 ms
メモリ 3676 KiB

コンパイルエラー

Main.cpp: In function ‘int main()’:
Main.cpp:8:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
    8 |         for(int i = l ; i < str.size() - r ; i ++) {
      |                         ~~^~~~~~~~~~~~~~~~

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 10
セット名 テストケース
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_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3480 KiB
00_sample_01.txt AC 1 ms 3484 KiB
00_sample_02.txt AC 1 ms 3628 KiB
01_random_03.txt AC 1 ms 3544 KiB
01_random_04.txt AC 1 ms 3452 KiB
01_random_05.txt AC 1 ms 3532 KiB
01_random_06.txt AC 1 ms 3476 KiB
01_random_07.txt AC 1 ms 3676 KiB
01_random_08.txt AC 1 ms 3548 KiB
01_random_09.txt AC 1 ms 3668 KiB