Submission #53016457


Source Code Expand

	#include <bits/stdc++.h>
	using namespace std;
	int main (){
		int n; cin >> n;
		vector <string> v;
		for (int i = 0; i < n; i++){
			string s; cin >> s;
			v.push_back(s);
		}
		int x, y;
		for (int i = 0; i < n; i++){
			string s; cin >> s;
			for (int j = 0; j < n; j++){
				if (s[j] != v[i][j]){
					x = i, y = j;
				}
			}
		}
		cout << x + 1 << " " << y + 1 << '\n';
		return 0;
	}

Submission Info

Submission Time
Task B - Spot the Difference
User r4m1m
Language C++ 20 (gcc 12.2)
Score 150
Code Size 412 Byte
Status AC
Exec Time 2 ms
Memory 3632 KiB

Compile Error

Main.cpp: In function ‘int main()’:
Main.cpp:19:50: warning: ‘y’ may be used uninitialized [-Wmaybe-uninitialized]
   19 |                 cout << x + 1 << " " << y + 1 << '\n';
      |                                                  ^~~~
Main.cpp:10:24: note: ‘y’ was declared here
   10 |                 int x, y;
      |                        ^
Main.cpp:19:34: warning: ‘x’ may be used uninitialized [-Wmaybe-uninitialized]
   19 |                 cout << x + 1 << " " << y + 1 << '\n';
      |                                  ^~~
Main.cpp:10:21: note: ‘x’ was declared here
   10 |                 int x, y;
      |                     ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 150 / 150
Status
AC × 3
AC × 11
Set Name Test Cases
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, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 2 ms 3444 KiB
00_sample_01.txt AC 1 ms 3384 KiB
00_sample_02.txt AC 1 ms 3632 KiB
01_random_00.txt AC 1 ms 3416 KiB
01_random_01.txt AC 1 ms 3572 KiB
01_random_02.txt AC 2 ms 3400 KiB
01_random_03.txt AC 1 ms 3492 KiB
01_random_04.txt AC 2 ms 3508 KiB
01_random_05.txt AC 1 ms 3516 KiB
01_random_06.txt AC 1 ms 3432 KiB
01_random_07.txt AC 1 ms 3468 KiB