답안 #863896

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
863896 2023-10-21T11:02:42 Z vjudge1 Crossing (JOI21_crossing) C++17
3 / 100
7000 ms 5620 KB
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>

using namespace std;


using ll = long long;


void check(string &a, string &b)
{
    for (int i = 0; i < a.size(); i++)
    {
        if (a[i] != b[i])
        {
            cout << "No" << endl;
            return;
        }
    }
    cout << "Yes" << endl;
}

void solve()
{
    ios::sync_with_stdio(false);

    int n, q;
    string s1, s2, s3, t0;
    cin >> n >> s1 >> s2 >> s3 >> q >> t0;
    check(s1, t0);
    for (int i = 0; i < q; i++)
    {
        int l, r;
        char c;
        cin >> l >> r >> c;
        for (int i = l - 1; i < r; i++)
        {
            t0[i] = c;
        }
        check(s1, t0);
    }
}


int main()
{
    int t = 1;
    // cin >> t;
    for (int i = 1; i <= t; i++)
    {
        // cout << "Case #" << i << ": ";
        solve();
    }
}

Compilation message

Main.cpp: In function 'void check(std::string&, std::string&)':
Main.cpp:16:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |     for (int i = 0; i < a.size(); i++)
      |                     ~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 227 ms 2404 KB Output is correct
2 Correct 246 ms 2416 KB Output is correct
3 Correct 273 ms 2384 KB Output is correct
4 Correct 239 ms 2460 KB Output is correct
5 Correct 243 ms 2664 KB Output is correct
6 Correct 236 ms 2352 KB Output is correct
7 Correct 246 ms 2504 KB Output is correct
8 Correct 255 ms 2572 KB Output is correct
9 Correct 293 ms 2384 KB Output is correct
10 Correct 251 ms 2852 KB Output is correct
11 Correct 279 ms 2432 KB Output is correct
12 Correct 253 ms 2456 KB Output is correct
13 Correct 250 ms 2384 KB Output is correct
14 Correct 246 ms 2516 KB Output is correct
15 Correct 251 ms 2856 KB Output is correct
16 Correct 247 ms 2512 KB Output is correct
17 Correct 246 ms 2384 KB Output is correct
18 Correct 264 ms 2652 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 227 ms 2404 KB Output is correct
2 Correct 246 ms 2416 KB Output is correct
3 Correct 273 ms 2384 KB Output is correct
4 Correct 239 ms 2460 KB Output is correct
5 Correct 243 ms 2664 KB Output is correct
6 Correct 236 ms 2352 KB Output is correct
7 Correct 246 ms 2504 KB Output is correct
8 Correct 255 ms 2572 KB Output is correct
9 Correct 293 ms 2384 KB Output is correct
10 Correct 251 ms 2852 KB Output is correct
11 Correct 279 ms 2432 KB Output is correct
12 Correct 253 ms 2456 KB Output is correct
13 Correct 250 ms 2384 KB Output is correct
14 Correct 246 ms 2516 KB Output is correct
15 Correct 251 ms 2856 KB Output is correct
16 Correct 247 ms 2512 KB Output is correct
17 Correct 246 ms 2384 KB Output is correct
18 Correct 264 ms 2652 KB Output is correct
19 Correct 5161 ms 5620 KB Output is correct
20 Execution timed out 7083 ms 3456 KB Time limit exceeded
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 227 ms 2404 KB Output is correct
2 Correct 246 ms 2416 KB Output is correct
3 Correct 273 ms 2384 KB Output is correct
4 Correct 239 ms 2460 KB Output is correct
5 Correct 243 ms 2664 KB Output is correct
6 Correct 236 ms 2352 KB Output is correct
7 Correct 246 ms 2504 KB Output is correct
8 Correct 255 ms 2572 KB Output is correct
9 Correct 293 ms 2384 KB Output is correct
10 Correct 251 ms 2852 KB Output is correct
11 Correct 279 ms 2432 KB Output is correct
12 Correct 253 ms 2456 KB Output is correct
13 Correct 250 ms 2384 KB Output is correct
14 Correct 246 ms 2516 KB Output is correct
15 Correct 251 ms 2856 KB Output is correct
16 Correct 247 ms 2512 KB Output is correct
17 Correct 246 ms 2384 KB Output is correct
18 Correct 264 ms 2652 KB Output is correct
19 Correct 242 ms 2492 KB Output is correct
20 Correct 289 ms 2432 KB Output is correct
21 Incorrect 254 ms 2640 KB Output isn't correct
22 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 227 ms 2404 KB Output is correct
2 Correct 246 ms 2416 KB Output is correct
3 Correct 273 ms 2384 KB Output is correct
4 Correct 239 ms 2460 KB Output is correct
5 Correct 243 ms 2664 KB Output is correct
6 Correct 236 ms 2352 KB Output is correct
7 Correct 246 ms 2504 KB Output is correct
8 Correct 255 ms 2572 KB Output is correct
9 Correct 293 ms 2384 KB Output is correct
10 Correct 251 ms 2852 KB Output is correct
11 Correct 279 ms 2432 KB Output is correct
12 Correct 253 ms 2456 KB Output is correct
13 Correct 250 ms 2384 KB Output is correct
14 Correct 246 ms 2516 KB Output is correct
15 Correct 251 ms 2856 KB Output is correct
16 Correct 247 ms 2512 KB Output is correct
17 Correct 246 ms 2384 KB Output is correct
18 Correct 264 ms 2652 KB Output is correct
19 Correct 5161 ms 5620 KB Output is correct
20 Execution timed out 7083 ms 3456 KB Time limit exceeded
21 Halted 0 ms 0 KB -