Submission #199813

# Submission time Handle Problem Language Result Execution time Memory
199813 2020-02-03T13:48:54 Z mohammedehab2002 Sajam (COCI18_sajam) C++11
45 / 90
58 ms 2268 KB
#include <bits/stdc++.h>
using namespace std;
int n,k;
string s[1005];
int get(string a,string b)
{
	int m=0;
	for (int i=0;i<n;i++)
	m+=(a[i]==b[i]);
	return min(m,n-m);
}
int main()
{
	cin >> n >> k;
	for (int i=0;i<n;i++)
	cin >> s[i];
	for (int i=0;i<n;i++)
	k-=get(s[0],s[i]);
	if (k>=0)
	cout << "DA";
	else
	cout << "NE";
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 380 KB Output is correct
2 Correct 14 ms 504 KB Output is correct
3 Correct 18 ms 888 KB Output is correct
4 Correct 45 ms 1272 KB Output is correct
5 Correct 18 ms 760 KB Output is correct
6 Correct 10 ms 504 KB Output is correct
7 Correct 18 ms 760 KB Output is correct
8 Correct 54 ms 1272 KB Output is correct
9 Correct 7 ms 376 KB Output is correct
10 Correct 48 ms 1272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Incorrect 5 ms 380 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 33 ms 1144 KB Output is correct
2 Correct 42 ms 1272 KB Output is correct
3 Correct 28 ms 1016 KB Output is correct
4 Correct 25 ms 888 KB Output is correct
5 Correct 45 ms 1144 KB Output is correct
6 Correct 20 ms 888 KB Output is correct
7 Correct 33 ms 1016 KB Output is correct
8 Correct 35 ms 1016 KB Output is correct
9 Correct 13 ms 504 KB Output is correct
10 Correct 54 ms 2168 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 43 ms 1272 KB Output is correct
2 Correct 41 ms 1144 KB Output is correct
3 Correct 26 ms 1016 KB Output is correct
4 Correct 32 ms 1016 KB Output is correct
5 Correct 34 ms 1108 KB Output is correct
6 Correct 51 ms 2168 KB Output is correct
7 Correct 16 ms 504 KB Output is correct
8 Correct 30 ms 1016 KB Output is correct
9 Correct 34 ms 1016 KB Output is correct
10 Correct 54 ms 2168 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 30 ms 888 KB Output is correct
2 Correct 26 ms 1016 KB Output is correct
3 Incorrect 54 ms 2168 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 58 ms 2268 KB Output is correct
2 Correct 53 ms 2172 KB Output is correct
3 Incorrect 48 ms 1272 KB Output isn't correct
4 Halted 0 ms 0 KB -