Submission #866499

# Submission time Handle Problem Language Result Execution time Memory
866499 2023-10-26T09:15:05 Z TAhmed33 Ekoeko (COCI21_ekoeko) C++
0 / 110
0 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
int main () {
	int n; 
	int a[26] = {}, b[26] = {};
	for (int i = 0; i < n; i++) {
		char x; cin >> x; a[x - 'a']++;
	}
	for (int i = 0; i < n; i++) {
		char x; cin >> x; b[x - 'a']++;
	}
	bool flag = 1; for (int i = 0; i < 26; i++) flag &= a[i] == b[i];
	assert(flag); cout << 0;
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:6:20: warning: 'n' is used uninitialized in this function [-Wuninitialized]
    6 |  for (int i = 0; i < n; i++) {
      |                  ~~^~~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -