Submission #23403567


Source Code Expand

#include <iostream>
#include <string.h>
#include <queue>
#include <vector>
#include <map>
#include <algorithm>
#define ll long long
#define pb push_back
#define pf push_front
#define ft first
#define sec second
#define pr pair<int,int>
#define ISCC ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std; 
int t ,n ,m ,a ,cnt[10005];
string s;
int main()
{
	cin >> n;
	int ok = 1;
	for(int i=0 ;i<n ;i++)
	{
		cin >> a;
		if(cnt[a]) ok = 0;  cnt[a]++;
	}
	if(ok) cout << "Yes\n";
	else cout << "No\n";
	return 0;
}

Submission Info

Submission Time
Task B - Permutation Check
User ck1080012
Language C++ (GCC 9.2.1)
Score 200
Code Size 555 Byte
Status AC
Exec Time 8 ms
Memory 3648 KiB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:24:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   24 |   if(cnt[a]) ok = 0;  cnt[a]++;
      |   ^~
./Main.cpp:24:23: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   24 |   if(cnt[a]) ok = 0;  cnt[a]++;
      |                       ^~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 4
AC × 14
Set Name Test Cases
Sample example_00.txt, example_01.txt, example_02.txt, example_03.txt
All example_00.txt, example_01.txt, example_02.txt, example_03.txt, handmade_00.txt, handmade_01.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, yes_00.txt, yes_01.txt, yes_02.txt, yes_03.txt
Case Name Status Exec Time Memory
example_00.txt AC 8 ms 3592 KiB
example_01.txt AC 2 ms 3604 KiB
example_02.txt AC 2 ms 3412 KiB
example_03.txt AC 3 ms 3468 KiB
handmade_00.txt AC 2 ms 3600 KiB
handmade_01.txt AC 3 ms 3648 KiB
random_00.txt AC 2 ms 3512 KiB
random_01.txt AC 2 ms 3416 KiB
random_02.txt AC 2 ms 3644 KiB
random_03.txt AC 2 ms 3580 KiB
yes_00.txt AC 2 ms 3628 KiB
yes_01.txt AC 2 ms 3416 KiB
yes_02.txt AC 2 ms 3508 KiB
yes_03.txt AC 2 ms 3648 KiB