buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
n=int(input())
s=[]
for i in range(N):
s.append(input())
print(len(set(s))) | n=int(input())
s=[]
for i in range(n):
s.append(input())
print(len(set(s))) | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22]] | 5 | 38 |
import java.util.Arrays;
import java.util.Scanner;
class Main {
public static void main(final String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
String S[] = new String[N];
int ans = 1;
for (int i = 0; i < N; i++) {
S[i] = sc.next();
}
Arrays.sort(S);
... | import java.util.Arrays;
import java.util.Scanner;
class Main {
public static void main(final String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
String S[] = new String[N];
int ans = 1;
for (int i = 0; i < N; i++) {
S[i] = sc.next();
}
Arrays.sort(S);
... | [["+", 8, 196, 0, 57, 15, 15, 0, 91, 17, 111]] | 3 | 148 |
N = input()
a = []
for i in range(N):
f = input()
a.append(f)
a=list(set(a))
print(len(a)) | N = int(input())
a = []
for i in range(N):
f = input()
a.append(f)
a=list(set(a))
print(len(a)) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 44 |
N=int(input())
len({input() for i in range(N)}) | N=int(input())
print(len({input() for i in range(N)})) | [["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 23 |
n = int(input())
s = list(set([int(input()) for _ in range(n)]))
print(len(s) ) | n = int(input())
s = list(set([input() for _ in range(n)]))
print(len(s) ) | [["-", 0, 652, 3, 4, 0, 658, 8, 652, 63, 22], ["-", 3, 4, 0, 658, 8, 652, 3, 4, 0, 24], ["-", 8, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 38 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int N;
scanf("%d", &N);
char list[N][11];
int i, j;
for (i = 0; i < N; i++) {
scanf("%s", list[i]);
}
qsort(list, N, 11, strcmp);
int count = 1;
for (j = 1; j < N; j++) {
if (strcmp(list[i - 1], list[i]) != 0) {
... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int N;
scanf("%d", &N);
char list[N][11];
int i, j;
for (i = 0; i < N; i++) {
scanf("%s", list[i]);
}
qsort(list, N, 11, strcmp);
int count = 1;
for (j = 1; j < N; j++) {
if (strcmp(list[j - 1], list[j]) != 0) {
... | [["-", 31, 2, 3, 4, 0, 69, 71, 16, 31, 22], ["+", 31, 2, 3, 4, 0, 69, 71, 16, 31, 22], ["-", 0, 16, 31, 2, 3, 4, 0, 69, 71, 22], ["+", 0, 16, 31, 2, 3, 4, 0, 69, 71, 22]] | 0 | 134 |
#include <bits/stdc++.h>
#define MOD (long long)(1E9 + 7)
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
rep(i, n) cin >> s[i];
sort(s.begin(), s.end());
int c = 0;
rep(i, n - 1) {
if (s[i] != s[i + 1])
c++;
}
cout << c... | #include <bits/stdc++.h>
#define MOD (long long)(1E9 + 7)
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
rep(i, n) cin >> s[i];
sort(s.begin(), s.end());
int c = 1;
rep(i, n - 1) {
if (s[i] != s[i + 1])
c++;
}
cout << c... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 107 |
function main(input) {
const result = input.split('\n');
const answer = new Set(result.slice(1));
console.log(answer.size);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8')); | function main(input) {
const result = input.trim().split('\n');
const answer = new Set(result.slice(1));
console.log(answer.size);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8')); | [["+", 51, 2, 63, 558, 500, 2, 63, 558, 559, 560], ["+", 51, 2, 63, 558, 500, 2, 3, 3, 0, 24], ["+", 51, 2, 63, 558, 500, 2, 3, 3, 0, 25], ["+", 0, 570, 0, 200, 51, 2, 63, 558, 0, 131]] | 2 | 63 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
void distinct(vector<string> &vect) {
sort(vect.begin(), vect.end());
vect.erase(unique(vect.begin(), vect.end()), vect.end());
return;
}
int main() {
int N;
cin >> N;
vector<string> S;
string temp;
f... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
void distinct(vector<string> &vect) {
sort(vect.begin(), vect.end());
vect.erase(unique(vect.begin(), vect.end()), vect.end());
return;
}
int main() {
int N;
cin >> N;
vector<string> S;
string temp;
f... | [["-", 0, 1, 0, 16, 31, 16, 12, 105, 0, 150], ["-", 0, 1, 0, 16, 31, 16, 12, 105, 0, 24], ["+", 0, 16, 31, 16, 12, 2, 63, 118, 17, 131], ["+", 0, 16, 31, 16, 12, 2, 63, 118, 119, 120], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24]] | 1 | 133 |
n = int(input())
A = [input() for i in range(n)]
print(len(A) - len(set(A)) + n) | n = int(input())
A = [input() for i in range(n)]
print(-len(A) + len(set(A)) + n)
| [["+", 3, 4, 0, 657, 31, 657, 31, 664, 17, 33], ["-", 0, 652, 3, 4, 0, 657, 31, 657, 17, 33], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 72]] | 5 | 39 |
n= input()
s=[]
for i in range(n):
s.append(input())
print(set(s))
| n= int(input())
s=[]
for i in range(n):
s.append(input())
print(len(set(s)))
| [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 32 |
n = input()
s = [input() for i in range(n)]
print(len(list(set(s)))) | n = int(input())
s = [input() for _ in range(n)]
print(len(list(set(s)))) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 0, 1, 0, 662, 12, 658, 0, 659, 31, 22], ["+", 0, 1, 0, 662, 12, 658, 0, 659, 31, 22]] | 5 | 32 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
map<string, int> mp;
while (n--) {
string st;
cin >> st;
mp[st] = 1;
}
cout << mp.size();
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
map<string, int> mp;
while (n--) {
string st;
cin >> st;
mp[st] = 1;
}
cout << mp.size();
return 0;
} | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 55 |
# encoding="UTF-8"
N = int(input())
S = set()
for i in range(N):
S.add(input())
print(S)
print(len(S)) | # encoding="UTF-8"
N = int(input())
S = set()
for i in range(N):
S.add(input())
print(len(S)) | [["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 41 |
N = int(input())
s = []
for i in range(N):
s.add(input())
print(len(s)) | N = int(input())
s = set()
for i in range(N):
s.add(input())
print(len(s)) | [["-", 0, 656, 0, 1, 0, 662, 12, 634, 0, 70], ["-", 0, 656, 0, 1, 0, 662, 12, 634, 0, 73], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 35 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
set<string> st;
for (int i = 0; i < n; i++) {
string s;
st.insert(s);
}
cout << st.size();
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
set<string> st;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
st.insert(s);
}
cout << st.size();
return 0;
}
| [["+", 0, 7, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]] | 1 | 62 |
N = int(input())
str_list = sorted(list(input() for _ in range(N)))
str_set = list(set(str_list))
print(str_set)
l = len(str_set)
print(l) | N = int(input())
str_list = sorted(list(input() for _ in range(N)))
str_set = list(set(str_list))
l = len(str_set)
print(l) | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 49 |
N = int(input())
items = set()
for i in range(0, N):
items.add(input())
return len(items) | N = int(input())
items = set()
for n in range(0, N):
items.add(input())
print(len(items)) | [["-", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["-", 36, 36, 36, 36, 0, 656, 0, 37, 0, 38], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 36 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> v(N);
{
for (int i = 0; i < N; i++) {
cin >> v.at(i);
}
}
sort(v.begin(), v.end());
int a = 0;
for (int i = 1; i < N; i++) {
if (v.at(i) != v.at(i - 1)) {
a++;
}
}
cout << a <<... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> v(N);
{
for (int i = 0; i < N; i++) {
cin >> v.at(i);
}
}
sort(v.begin(), v.end());
int a = 1;
for (int i = 1; i < N; i++) {
if (v.at(i) != v.at(i - 1)) {
a++;
}
}
cout << a <<... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 120 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> S(N);
for (int i = 0; i < N; i++)
cin >> S.at(i);
sort(S.begin(), S.end());
int ans = 0;
for (int i = 0; i < N - 1; i++)
if (S.at(i) != S.at(i + 1))
ans++;
cout <... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> S(N);
for (int i = 0; i < N; i++)
cin >> S.at(i);
sort(S.begin(), S.end());
int ans = 1;
for (int i = 0; i < N - 1; i++)
if (S.at(i) != S.at(i + 1))
ans++;
cout <... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 121 |
n = int(input())
s = set()
for _ in range(n):
string = input()
s.add(string)
return len(s)
| n = int(input())
s = set()
for _ in range(n):
string = input()
s.add(string)
print(len(s))
| [["-", 36, 36, 36, 36, 0, 656, 0, 37, 0, 38], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 37 |
N = int(input())
S = [input() for i in range(N)]
print(len(S)) | N = int(input())
S = set([input() for i in range(N)])
print(len(S)) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 29 |
N=input()
S = [str(input()) for i in range(N)]
print(len(set(S))) | N=int(input())
S = [str(input()) for i in range(N)]
print(len(set(S))) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 32 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int counter = 1;
cin >> n;
string s[n];
for (int i = 0; i < n; i++) {
cin >> s[i];
}
sort(s, s + n);
for (int i = 1; i < n; i++) {
if (s[i - 1] == s[i]) {
counter += 1;
}
}
cout << counter << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int counter = 1;
cin >> n;
string s[n];
for (int i = 0; i < n; i++) {
cin >> s[i];
}
sort(s, s + n);
for (int i = 1; i < n; i++) {
if (s[i - 1] != s[i]) {
counter += 1;
}
}
cout << counter << endl;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 104 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vl vector<ll>
#define pii pair<int, int>
#define vvi vector<vi>
#define vvl vector<vl>
#define all(x) x.begin(), x.end()
#define contains(con, x) con.find(x) != con.end()
#define fastread ios_base::sync_with_stdio(0), ci... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vl vector<ll>
#define pii pair<int, int>
#define vvi vector<vi>
#define vvl vector<vl>
#define all(x) x.begin(), x.end()
#define contains(con, x) con.find(x) != con.end()
#define fastread ios_base::sync_with_stdio(0), ci... | [["+", 8, 9, 0, 43, 49, 53, 54, 55, 0, 24], ["+", 0, 43, 49, 53, 54, 55, 0, 56, 39, 78], ["+", 8, 9, 0, 43, 49, 53, 54, 55, 0, 25]] | 1 | 126 |
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
typedef long long ll;
typedef long double ld;
#define FASTIO \
ios_b... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
typedef long long ll;
typedef long double ld;
#define FASTIO \
ios_b... | [["-", 0, 16, 31, 16, 12, 2, 63, 118, 28, 22], ["+", 0, 16, 31, 16, 12, 2, 63, 118, 28, 22]] | 1 | 135 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
int count = 0;
vector<long long> a(n);
for (long long i = 0; i < n; ++i)
cin >> a[i];
sort(a.begin(), a.end());
for (long long i = 0; i < n; ++i) {
if (a[i] == a[i + 1])
count++;
}
cout << n - count << en... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
int count = 0;
vector<string> a(n);
for (long long i = 0; i < n; ++i)
cin >> a[i];
sort(a.begin(), a.end());
for (long long i = 0; i < n; ++i) {
if (a[i] == a[i + 1])
count++;
}
cout << n - count << endl;... | [["-", 39, 344, 3, 347, 0, 77, 39, 86, 0, 96], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78]] | 1 | 114 |
n=int(input())
p=set((x for x in [0]*n))
print(len(p)) | n=int(input())
p=set((input() for x in [0]*n))
print(len(p)) | [["-", 0, 662, 12, 652, 3, 4, 0, 668, 8, 22], ["+", 12, 652, 3, 4, 0, 668, 8, 652, 63, 22], ["+", 3, 4, 0, 668, 8, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 668, 8, 652, 3, 4, 0, 25]] | 5 | 31 |
#include <bits/stdc++.h>
using namespace std;
int N, ans = 0;
string str;
map<string, int> mp;
int main() {
cin >> N;
for (int i = 0; i < N; i++)
cin >> str;
mp[str] = 1;
for (auto i = mp.begin(); i != mp.end(); ++i)
ans += i->second;
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int N, ans = 0;
string str;
map<string, int> mp;
int main() {
cin >> N;
for (int i = 0; i < N; i++) {
cin >> str;
mp[str] = 1;
}
for (auto i = mp.begin(); i != mp.end(); ++i)
ans += i->second;
cout << ans << endl;
return 0;
} | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 96 |
// ここから「ここまでテンプレ」までテンプレ
#define NOMINMAX
#define TEST_MODE true
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#include <random>
#include <regex>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep2(i, a, b) for (int i = (a); i < (int)(b); ++i)
#de... | // ここから「ここまでテンプレ」までテンプレ
#define NOMINMAX
#define TEST_MODE true
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#include <random>
#include <regex>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep2(i, a, b) for (int i = (a); i < (int)(b); ++i)
#de... | [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78], ["-", 8, 9, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 1,350 |
#include <iostream>
#include <set>
#include <string>
using namespace std;
int main() {
int N;
string str;
cin >> N;
set<string> s;
while (--N) {
cin >> str;
s.insert(str);
}
cout << s.size() << endl;
return 0;
}
| #include <iostream>
#include <set>
#include <string>
using namespace std;
int main() {
int N;
string str;
cin >> N;
set<string> s;
while (N--) {
cin >> str;
s.insert(str);
}
cout << s.size() << endl;
return 0;
} | [["-", 8, 9, 0, 52, 15, 339, 51, 27, 17, 68], ["+", 8, 9, 0, 52, 15, 339, 51, 27, 17, 68]] | 1 | 63 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t N, count = 1;
string S;
cin >> N;
vector<string> vec(N);
for (int i = 0; i < N; i++) {
cin >> vec.at(0);
}
sort(vec.begin(), vec.end());
for (int i = 1; i < N; i++) {
if (vec.at(i - 1) != vec.at(i))
count++;
}
cout ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t N, count = 1;
string S;
cin >> N;
vector<string> vec(N);
for (int i = 0; i < N; i++) {
cin >> vec.at(i);
}
sort(vec.begin(), vec.end());
for (int i = 1; i < N; i++) {
// cout << i << " " << vec.at(i);
if (vec.at(i - 1) !=... | [["-", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 22]] | 1 | 118 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define sec second
#define fir first
#define mo 998244353
#define inf 1e18
#define rep(i, s, n) for (ll i = s; i < n; i = i + 1)
#define rrep(i, s, n) for (ll i = s; i >= n; i--)
#define adiii ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define sec second
#define fir first
#define mo 998244353
#define inf 1e18
#define rep(i, s, n) for (ll i = s; i < n; i = i + 1)
#define rrep(i, s, n) for (ll i = s; i >= n; i--)
#define adiii ... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 183 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define BUFSIZE 100
int N;
int count = 0;
int string_compar(const void *a, const void *b) {
return (strcmp((char *)a, (char *)b));
}
int main(void) {
scanf("%d", &N);
char str[N][11];
for (int j = 0; j < N; j++) {
scanf("%s", str[j]);
}
int ... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define BUFSIZE 100
int N;
int count = 0;
int string_compar(const void *a, const void *b) {
return (strcmp((char *)a, (char *)b));
}
int main(void) {
scanf("%d", &N);
char str[N][11];
for (int j = 0; j < N; j++) {
scanf("%s", str[j]);
}
int ... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33]] | 0 | 186 |
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
int n;
int i;
string str[n];
map<string, int> map;
for (i = 0; i < n; i++) {
cin >> str[i];
map[str[i]]++;
}
int l = map.size();
cout << l;
return 0;
} | #include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
int n;
int i;
cin >> n;
string str[n];
map<string, int> map;
for (i = 0; i < n; i++) {
cin >> str[i];
map[str[i]]++;
}
int l = map.size();
cout << l;
return 0;
} | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 83 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ans = 0;
vector<int> b(N);
for (int i = 0; i < N; i++) {
cin >> b[i];
}
set<int> a;
for (int i = 0; i < N; i++) {
a.insert(b[i]);
}
cout << a.size() << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ans = 0;
vector<string> S(N);
for (int i = 0; i < N; i++) {
cin >> S[i];
}
set<string> a;
for (int i = 0; i < N; i++) {
a.insert(S[i]);
}
cout << a.size() << endl;
}
| [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78], ["-", 0, 14, 8, 9, 0, 43, 49, 53, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 53, 49, 22], ["-", 8, 9, 0, 1, 0, 16, 12, 69, 28, 22], ["+", 8, 9, 0, 1, 0, 16, 12, 69, 28, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 69, 28, 22], ["+", 0, 1, 0, 2,... | 1 | 98 |
n= int(input())
kk=set()
for i in range(n):
s=input()
kk.add()
print(len(kk)) | n= int(input())
kk=set()
for i in range(n):
s=input()
kk.add(s)
print(len(kk)) | [["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 38 |
function main(input) {
const args = input.split('\n');
const N = args[0];
const Si = args.slice(1, N + 1);
const set = new Set(Si);
console.log(set.size);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8')); | function main(input) {
const args = input.trim('').split('\n');
const N = args[0];
const Si = args.slice(1, N + 1);
const set = new Set(Si);
console.log(set.size);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8')); | [["+", 51, 2, 63, 558, 500, 2, 63, 558, 559, 560], ["+", 51, 2, 63, 558, 500, 2, 3, 3, 0, 24], ["+", 63, 558, 500, 2, 3, 3, 0, 557, 0, 104], ["+", 51, 2, 63, 558, 500, 2, 3, 3, 0, 25], ["+", 0, 570, 0, 200, 51, 2, 63, 558, 0, 131]] | 2 | 80 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
int count = 0;
cin >> N;
map<string, int> mp;
for (int i = 0; i < N; i++) {
string s;
cin >> s;
mp[s];
}
for (auto &it : mp) {
if (it.second >= 1)
count++;
}
cout << count << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
int count = 0;
cin >> N;
map<string, int> mp;
for (int i = 0; i < N; i++) {
string s;
cin >> s;
mp[s]++;
}
for (auto &it : mp) {
if (it.second >= 1)
count++;
}
cout << count << endl;
}
| [["+", 0, 7, 8, 9, 0, 1, 0, 27, 17, 29]] | 1 | 87 |
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
#dt = {k:v for k,v in sorted(x.items(), key=lambda i: i[1])}
ipnl = lambda n: [input() for _ in range(n)]
inp = lambda :int(input())
ip = lambda :[int(w) for w in input().split()]
mp = lambda :map(int,input().split())
n = input()
x = inpl(n)
print(len(set(x))) | #dt = {} for i in x: dt[i] = dt.get(i,0)+1
#dt = {k:v for k,v in sorted(x.items(), key=lambda i: i[1])}
ipnl = lambda n: [input() for _ in range(n)]
inp = lambda :int(input())
ip = lambda :[int(w) for w in input().split()]
mp = lambda :map(int,input().split())
n = inp()
x = ipnl(n)
print(len(set(x))) | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 86 |
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define STR 11
int main() {
int n, cnt = 0;
scanf("%d", &n);
char S[n + 1][STR];
for (int i = 0; i < n; i++) {
scanf("%s\n", S[i]);
}
qsort(S, n, sizeof(S[0]), strcmp);
for (int i = 1; i < n; i++) {
i... | #include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define STR 11
int main() {
int n, cnt = 1;
scanf("%d", &n);
char S[n + 1][STR];
for (int i = 0; i < n; i++) {
scanf("%s\n", S[i]);
}
qsort(S, n, sizeof(S[0]), strcmp);
for (int i = 1; i < n; i++) {
i... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 146 |
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#define ll long long
#define SIZE_OF_ARRAY(array) (sizeof(array) / sizeof(array[0]))
using namespace std;
int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; }
int main() {
int N;
cin >> N;
vector<string> S;
ll ans = 0;
... | #include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#define ll long long
#define SIZE_OF_ARRAY(array) (sizeof(array) / sizeof(array[0]))
using namespace std;
int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; }
int main() {
int N;
cin >> N;
vector<string> S;
ll ans = 1;
... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, ... | 1 | 194 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#define maxn 200010
using namespace std;
struct node {
char s[12];
} q[maxn];
char pre[12];
int cmp(node a, node b) { return strcmp(a.s, b.s) < 0; }
int main() {
int n, i, cnt = 1;
scanf("%d", &n);
for (i = 1; i <= n; i++)
scanf("%s", q[i].s);
sort... | #include <algorithm>
#include <cstdio>
#include <cstring>
#define maxn 200010
using namespace std;
struct node {
char s[12];
} q[maxn];
char pre[12];
int cmp(node a, node b) { return strcmp(a.s, b.s) < 0; }
int main() {
int n, i, cnt = 1;
scanf("%d", &n);
for (i = 1; i <= n; i++)
scanf("%s", q[i].s);
sort... | [["-", 8, 57, 64, 1, 0, 34, 31, 2, 63, 22], ["+", 8, 57, 64, 1, 0, 34, 31, 2, 63, 22]] | 1 | 195 |
import collections
N = int(input())
S = []
for i in range(N):
S.append(input())
c = collections.counter(S)
print(len(c))
| import collections
N = int(input())
S = []
for i in range(N):
S.append(input())
c = collections.Counter(S)
print(len(c))
| [["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22]] | 5 | 45 |
M = int(input())
P = [input().split() for i in range(M)]
print(len(set(P))) | M = int(input())
P = [input() for i in range(M)]
print(len(set(P))) | [["-", 0, 662, 12, 658, 8, 652, 63, 319, 0, 131], ["-", 0, 662, 12, 658, 8, 652, 63, 319, 319, 22], ["-", 0, 662, 12, 658, 8, 652, 3, 4, 0, 24], ["-", 0, 662, 12, 658, 8, 652, 3, 4, 0, 25]] | 5 | 36 |
n = int(input())
s_list = []
for i in range(n):
temp = input()
s_list.append(temp)
len(set(s_list)) | n = int(input())
s_list = []
for i in range(n):
temp = input()
s_list.append(temp)
print(len(set(s_list))) | [["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 38 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
int main() {
int n;
int cnt = 0;
set<string> st;
rep(i, n) {
string s;
cin >> s;
if (!st.count(s)) {
cnt++;
st.insert(s);
}
}
cout << cnt << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
int main() {
int n;
cin >> n;
int cnt = 0;
set<string> st;
rep(i, n) {
string s;
cin >> s;
if (!st.count(s)) {
cnt++;
st.insert(s);
}
}
cout << cnt << endl;
} | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 77 |
import java.util.HashSet;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int num = scanner.nextInt();
HashSet<String> result = new HashSet<>();
for (int i = 0; i < num; i++) {
String gacha = scanner.nextLine();
... | import java.util.HashSet;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int num = scanner.nextInt();
scanner.nextLine();
HashSet<String> result = new HashSet<>();
for (int i = 0; i < num; i++) {
String gacha ... | [["+", 0, 195, 8, 196, 0, 1, 0, 492, 500, 22], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 0, 131], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 25], ["+", 8, 498, 0, 195, 8, 196, 0, 1, 0, 35]] | 3 | 109 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(x) x.begin(), x.end()
using namespace std;
using ll = long long;
using p = pair<int, int>;
int main() {
int n;
cin >> n;
map<string, bool> a;
rep(i, n) {
string s;
cin >> s;
if (a.count(s))
break;
else
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(x) x.begin(), x.end()
using namespace std;
using ll = long long;
using p = pair<int, int>;
int main() {
int n;
cin >> n;
map<string, bool> a;
rep(i, n) {
string s;
cin >> s;
if (a.count(s))
continue;
else... | [["-", 0, 14, 8, 9, 0, 57, 64, 93, 0, 94], ["+", 0, 14, 8, 9, 0, 57, 64, 116, 0, 117]] | 1 | 104 |
<?php
fscanf(STDIN,"%d",$n);
while ($line = fgets(STDIN)) {
$gifs[] = trim($line);
}
array_unique($gifs);
echo count($gifs); | <?php
fscanf(STDIN,"%d",$n);
while ($line = fgets(STDIN)) {
$gifs[] = trim($line);
}
$unique = array_unique($gifs);
echo count($unique);
| [["+", 0, 493, 0, 1, 0, 11, 31, 606, 0, 607], ["+", 0, 493, 0, 1, 0, 11, 31, 606, 0, 141], ["+", 36, 36, 0, 493, 0, 1, 0, 11, 0, 32], ["-", 0, 613, 3, 3, 0, 28, 0, 606, 0, 141], ["+", 0, 613, 3, 3, 0, 28, 0, 606, 0, 141]] | 6 | 49 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> vec(N);
for (int i = 0; i < N; i++) {
cin >> vec.at(i);
}
int S = 0;
sort(vec.begin(), vec.end());
for (int i = 0; i < N - 1; i++) {
if (vec.at(i) != vec.at(i + 1)) {
S++;
}
}
cout <<... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> vec(N);
for (int i = 0; i < N; i++) {
cin >> vec.at(i);
}
int S = 1;
sort(vec.begin(), vec.end());
for (int i = 0; i < N - 1; i++) {
if (vec.at(i) != vec.at(i + 1)) {
S++;
}
}
cout <<... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 123 |
n=int(input())
List = [input() for i in range(n)]
set(List)
print(len(List)) | n=int(input())
List = [input() for i in range(n)]
d=set(List)
print(len(d)) | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 33 |
N=int(input())
a=[0]*(N+2)
c=0
for i in range (N):
S=input()
a[i]=S
c=len(set(a))
print(c)
| N=int(input())
a=[0]*(N)
c=0
for i in range (N):
S=input()
a[i]=S
c=len(set(a))
print(c)
| [["-", 0, 662, 12, 657, 12, 23, 0, 657, 17, 72], ["-", 0, 662, 12, 657, 12, 23, 0, 657, 12, 612]] | 5 | 54 |
# -*- coding: utf-8 -*-
from collections import Counter
a = int(input())
list = [input() for i in range(a)]
print(list)
print(len(Counter(list))) | # -*- coding: utf-8 -*-
from collections import Counter
a = int(input())
list = [input() for i in range(a)]
print(len(Counter(list))) | [["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 41 |
N = int(input())
S = set()
for i in range(N):
S.add(i)
print(len(S)) | N = int(input())
S = set()
for i in range(N):
S.add(input())
print(len(S)) | [["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 34 |
# coding: utf-8
kaisuu = int(input())
getprizelist = {}
for i in range(kaisuu):
keihin = input()
if keihin not in getprizelist:
getprizelist[i] = keihin
print(len(getprizelist))
| # coding: utf-8
kaisuu = int(input())
getprizelist = {}
for i in range(kaisuu):
keihin = input()
if keihin not in getprizelist:
getprizelist[keihin] = i
print(len(getprizelist))
| [["-", 64, 196, 0, 1, 0, 662, 31, 206, 206, 22], ["+", 64, 196, 0, 1, 0, 662, 31, 206, 206, 22], ["-", 0, 57, 64, 196, 0, 1, 0, 662, 12, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 12, 22]] | 5 | 45 |
n=int(input())
g=[]
for i in range(n):
gi=input()
g.append(gi)
g.sort()
count=1
for i in range(n-1):
if g[i]!=g[i+1]:
count+=1
print(g)
print(count) | n=int(input())
g=[]
for i in range(n):
gi=input()
g.append(gi)
g.sort()
count=1
for i in range(n-1):
if g[i]!=g[i+1]:
count+=1
print(count)
| [["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 73 |
#include "bits/stdc++.h"
#include <string>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
void sort2array(double *a, long *b, long n) {
for (int i = 0; i < n; i++) {
b[i] = i;
}
sort(b, b + n, [a](long i, long j) -> bool { return a[i] < a[j]; });
}
// bを何回足せばaを超えるか
int wtover(int ... | #include "bits/stdc++.h"
#include <string>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
void sort2array(double *a, long *b, long n) {
for (int i = 0; i < n; i++) {
b[i] = i;
}
sort(b, b + n, [a](long i, long j) -> bool { return a[i] < a[j]; });
}
// bを何回足せばaを超えるか
int wtover(int ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 459 |
#include <iostream>
#include <list>
#include <string>
using namespace std;
int main() {
int n;
string s;
cin >> n;
list<string> lst;
for (int i = 0; i < n; i++) {
cin >> s;
lst.push_back(s);
}
lst.unique();
cout << lst.size() << endl;
return 0;
} | #include <iostream>
#include <list>
#include <string>
using namespace std;
int main() {
int n;
string s;
cin >> n;
list<string> lst;
for (int i = 0; i < n; i++) {
cin >> s;
lst.push_back(s);
}
lst.sort();
lst.unique();
cout << lst.size() << endl;
return 0;
} | [["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 17, 131]] | 1 | 78 |
num = gets.to_i
item = []
i = 0
for i in 0..num-1
item[i] = gets.chomp
end
p item.uniq!.length | num = gets.to_i
item = []
i = 0
for i in 0..num-1
item[i] = gets.chomp
end
p item.uniq.length | [["-", 0, 652, 3, 4, 0, 652, 486, 652, 735, 22], ["+", 0, 652, 3, 4, 0, 652, 486, 652, 735, 22]] | 4 | 35 |
n = int(input())
s = set()
for i in range(n):
s.add(str(input()).lower())
print(len(x))
| n = int(input())
s = set()
for i in range(n):
s.add(str(input()).lower())
print(len(s)) | [["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 43 |
#coding UTF-8
from collections import Counter
n= int(input())#1行目のNを取得する
l=[input()for i in range(n)] #複数行の数値の入力を取得
c=cCounter(l)
print(len(c)) | #coding UTF-8
from collections import Counter
n= int(input())#1行目のNを取得する
l=[input()for i in range(n)] #複数行の数値の入力を取得
c=Counter(l)
print(len(c)) | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 42 |
n = int(input())
set1 = set([])
for _ in range():
s = input()
set1.add(s)
print(len(set1)) | n = int(input())
set1 = set([])
for _ in range(n):
s = input()
set1.add(s)
print(len(set1)) | [["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22]] | 5 | 40 |
import collections
num = input()
a = [input() for i in range(num)]
clist = collections.Counter(a)
print(len(clist)) | import collections
num = int(input())
a = [input() for i in range(num)]
clist = collections.Counter(a)
print(len(clist)) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 36 |
num=int(input())
lst=[]
if 1<=num<=2*10**5:
lst=[input() for i in range(num)]
print(lst)
print(len(set(lst))) | num=int(input())
lst=[]
if 1<=num<=2*10**5:
lst=[input() for i in range(num)]
print(len(set(lst))) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 51 |
N = int(input())
l = []
for i in range(N):
l.append(input())
k = sorted(l)
ans = 0
for i in range(N):
a = 0
if k[i]!=a:
ans+= 1
a = k[i]
print(ans) | N = int(input())
l = []
for i in range(N):
l.append(input())
k = sorted(l)
ans = 0
a = 0
for i in range(N):
if k[i]!=a:
ans+= 1
a = k[i]
print(ans) | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 69 |
N=int(input())
l=[]
for i in range(1,N):
l.append(input())
print(len(set(l))) | N=int(input())
l=[]
for i in range(N):
l.append(input())
print(len(set(l))) | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 40 |
import sys
def main():
N = int(input())
d = {}
for i in range(N):
A = int(input())
d[A] = 0
print(len(d))
if __name__ == "__main__":
main() | import sys
def main():
N = int(input())
d = {}
for i in range(N):
A = input()
d[A] = 0
print(len(d))
if __name__ == "__main__":
main() | [["-", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 58 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
int main() {
int n;
cin >> n;
vector<string> s;
rep(i, n) cin >> s[i];
int cnt = 1;
sort(s.begin(), s.end());
rep(i, n - 1) {
if (s[i] != s[i + 1])
cnt++;
}
cout << cn... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
int main() {
int n;
cin >> n;
vector<string> s(n);
rep(i, n) cin >> s[i];
int cnt = 1;
sort(s.begin(), s.end());
rep(i, n - 1) if (s[i] != s[i + 1]) cnt++;
cout << cnt;
} | [["+", 8, 9, 0, 43, 49, 53, 54, 55, 0, 24], ["+", 0, 43, 49, 53, 54, 55, 0, 56, 39, 78], ["+", 8, 9, 0, 43, 49, 53, 54, 55, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 9, 0, 45], ["-", 0, 30, 0, 14, 8, 9, 0, 9, 0, 46]] | 1 | 104 |
n=int(input())
r=0
l=[]
for i in range(n):
l.append(input())
l.sort()
for i in range(n-1):
if l[i]!=l[i+1]:
r+=1
print(r)
| n=int(input())
r=1
l=[]
for i in range(n):
l.append(input())
l.sort()
for i in range(n-1):
if l[i]!=l[i+1]:
r+=1
print(r)
| [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 66 |
#include <bits/stdc++.h>
#include <map>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
for (int i = 0; i < n; i++)
cin >> s[i];
int sum = 0;
sort(s.begin(), s.end());
s.erase(unique(s.begin(), s.end()));
cout << s.size() << endl;
} | #include <bits/stdc++.h>
#include <map>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
for (int i = 0; i < n; i++)
cin >> s[i];
int sum = 0;
sort(s.begin(), s.end());
s.erase(unique(s.begin(), s.end()), s.end());
cout << s.size() << endl;
}
| [["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 17, 131], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 103 |
s = int(input()) #nは入力回数
s_list = [input() for _ in range(s)]
print(s_list) # 出力を確認
ans = 0
s_list = set(s_list)
print(len(s_list)) |
s = int(input()) #nは入力回数
s_list = [input() for _ in range(s)]
# print(s_list) # 出力を確認
ans = 0
s_list = set(s_list)
print(len(s_list)) | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 44 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct list {
char name[15];
struct list *next;
};
struct list *talloc() {
return (struct list *)malloc(sizeof(struct list));
}
char a[200007][14];
struct list *data[256000];
int main() {
int n;
int i, r, j;
int ans = 0;
long... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct list {
char name[15];
struct list *next;
};
struct list *talloc() {
return (struct list *)malloc(sizeof(struct list));
}
char a[200007][14];
struct list *data[256000];
int main() {
int n;
int i, r, j;
int ans = 0;
long... | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 31, 22], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]] | 0 | 324 |
from collections import Counter
N = int(input())
s = [input() for i in range(N)]
c = collections.Counter(s)
print(len(c)) | from collections import Counter
N = int(input())
s = [input() for i in range(N)]
c = Counter(s)
print(len(c)) | [["-", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131]] | 5 | 41 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int cmp(const void *a, const void *b) { return strcmp(a, b); }
char s[200015][12];
int main(void) {
int n;
int dif = 1;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%s", s[i]);
}
qsort(s, n, sizeof(char) * 10, cmp);
if (strcmp(s[0... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int cmp(const void *a, const void *b) { return strcmp(a, b); }
char s[200015][15];
int main(void) {
int n;
int dif = 1;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%s", s[i]);
}
qsort(s, n, sizeof(char) * 15, cmp);
if (strcmp(s[0... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 0 | 189 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rrep(i, n) for (int i = n - 1; i >= 0; --i)
#define REP(i, a, b) for (int i = a; i < b; i++)
#define yesno(flg) \
if (flg) { ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rrep(i, n) for (int i = n - 1; i >= 0; --i)
#define REP(i, a, b) for (int i = a; i < b; i++)
#define yesno(flg) \
if (flg) { ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 276 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N_MAX 200001
int upordown(void *a, void *b) { return strcmp((char *)a, (char *)b); };
int main() {
int N, count = 1;
char S[N_MAX][11];
scanf("%d", &N);
for (int a = 0; a < N; a++)
scanf("%s", S[a]);
qsort(S, N, sizeof(S), upordown);
f... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N_MAX 200001
int upordown(void *a, void *b) { return strcmp((char *)a, (char *)b); };
int main() {
int N, count = 1;
char S[N_MAX][11];
scanf("%d", &N);
for (int a = 0; a < N; a++)
scanf("%s", S[a]);
qsort(S, N, sizeof(S[0]), upordown);
... | [["+", 3, 4, 0, 105, 51, 23, 0, 69, 0, 70], ["+", 3, 4, 0, 105, 51, 23, 0, 69, 71, 13], ["+", 3, 4, 0, 105, 51, 23, 0, 69, 0, 73]] | 0 | 162 |
n = int(input())
a = []
for i in range(n):
a.apped(str(input()))
print(len(set(a))) | n = int(input())
a = []
for i in range(n):
a.append(str(input()))
print(len(set(a)))
| [["-", 8, 196, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 8, 196, 0, 1, 0, 652, 63, 319, 319, 22]] | 5 | 41 |
N = int(input())
a_list=[]
for i in range(N):
a_list.append(input())
set(a_list)
a_num = len(a_list)
print(a_num) | N = int(input())
a_list=[]
for i in range(N):
a_list.append(input())
a_set = set(a_list)
a_num = len(a_set)
print(a_num)
| [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22]] | 5 | 42 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cstring>
#include <math.h>
#define test(t) while (t--)
#define fo(i, k, n) for (int i = k; i < n; i++)
#define refl(a, x) for (auto &a : x)
#define MIN(a, b) (a > b ? b : a)
#define ll long long int
#define MOD 1e9 + 7
#define in cin >>
#define out cout <<
#defin... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstring>
#include <math.h>
#define test(t) while (t--)
#define fo(i, k, n) for (int i = k; i < n; i++)
#define refl(a, x) for (auto &a : x)
#define MIN(a, b) (a > b ? b : a)
#define ll long long int
#define MOD 1e9 + 7
#define in cin >>
#define out cout <<
#defin... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 222 |
from collections import Counter
n = int(input())
s = [input() for i in range(n)]
c = Counter(s)
c = list(s.items())
print(len(c)) | from collections import Counter
n = int(input())
s = [input() for i in range(n)]
c = Counter(s)
c = list(c.items())
print(len(c)) | [["-", 12, 652, 3, 4, 0, 652, 63, 319, 500, 22], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 500, 22]] | 5 | 49 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define F(i, a, n) for (int i = a; i < n; i++)
int compare(const void *b1, const void *b2) {
return strcmp(*(const char **)b1, *(const char **)b2);
}
int main() {
int n;
scanf("%d", &n);
char s[n][20];
int count = 0;
F(i, 0, n) ... |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define F(i, a, n) for (int i = a; i < n; i++)
int compare(const void *b1, const void *b2) {
return strcmp((const char **)b1, (const char **)b2);
}
int main() {
int n;
scanf("%d", &n);
char s[n][20];
int count = 0;
F(i, 0, n) { ... | [["-", 0, 37, 0, 2, 3, 4, 0, 66, 17, 48]] | 0 | 176 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int n, i;
char s[200001][11];
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf("%s", &s[i]);
}
qsort(s, n, 11, strcmp);
int count = 1;
for (i = 1; i < n; i++) {
if (strcmp(s[i], s[i - 1]) != 0) {
count++;
}
... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int n, i;
char s[200001][11];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s", &s[i]);
}
qsort(s, n, 11, strcmp);
int count = 1;
for (i = 1; i < n; i++) {
if (strcmp(s[i], s[i - 1]) != 0) {
count++;
}
}... | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]] | 0 | 132 |
n = int(input())
dic = {}
cnt =0
for i in range(n):
get = input()
if get not in dic:
dic[get] = 1
print(len(dic))
print(dic) | n = int(input())
dic = {}
cnt =0
for i in range(n):
get = input()
if get not in dic:
dic[get] = 1
print(len(dic)) | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 51 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
int count = 1;
for (int i = 0; i < n; i++) {
cin >> s[n];
}
sort(s.begin(), s.end());
for (int i = 0; i < n - 1; i++) {
if (s[i] != s[i + 1]) {
count++;
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
int count = 1;
for (int i = 0; i < n; i++) {
cin >> s[i];
}
sort(s.begin(), s.end());
for (int i = 0; i < n - 1; i++) {
if (s[i] != s[i + 1]) {
count++;
... | [["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22]] | 1 | 121 |
function main(input) {
const i = input.split('\n');
const n = parseInt(i[0]);
const map = new Map();
for (let k = 1; k < n; k++) {
if (!map.get(i[k]))
map.set(i[k], 1);
else
map.set(i[k], map.get(i[k]) + 1);
}
console.log(map.size);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8')... | function main(input) {
const i = input.split('\n');
const n = parseInt(i[0]);
const map = new Map();
for (let k = 1; k < n + 1; k++) {
if (!map.get(i[k]))
map.set(i[k], 1);
else
map.set(i[k], map.get(i[k]) + 1);
}
console.log(map.size);
}
main(require('fs').readFileSync('/dev/stdin', 'ut... | [["+", 0, 7, 15, 1, 0, 16, 12, 16, 17, 72], ["+", 0, 7, 15, 1, 0, 16, 12, 16, 12, 555]] | 2 | 132 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n = 0;
int count = 1;
cin >> n;
vector<int> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i];
}
sort(v.begin(), v.end());
for (int i = 1; i < n; i++) {
if (v[i] != v[i - 1]) {
count++;
}
}
cout << count;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n = 0;
int count = 1;
cin >> n;
vector<string> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i];
}
sort(v.begin(), v.end());
for (int i = 1; i < n; i++) {
if (v[i] != v[i - 1]) {
count++;
}
}
cout << count;
} | [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78]] | 1 | 112 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
for (int i = 0; i < n; i++) {
cin >> s.at(i);
}
sort(s.begin(), s.end());
int count = 0;
for (int i = 0; i < n - 1; i++) {
if (s.at(i) != s.at(i +... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
for (int i = 0; i < n; i++) {
cin >> s.at(i);
}
sort(s.begin(), s.end());
int count = 1;
for (int i = 0; i < n - 1; i++) {
if (s.at(i) != s.at(i +... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 126 |
#include <iostream>
#include <map>
using namespace std;
int main() {
int N;
string temp;
map<string, int> array;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> temp;
array["temp"] = 1;
}
cout << array.size();
return 0;
}
| #include <iostream>
#include <map>
using namespace std;
int main() {
int N;
string temp;
map<string, int> array;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> temp;
array[temp] = 1;
}
cout << array.size();
return 0;
} | [["-", 0, 11, 31, 69, 341, 342, 0, 5, 0, 62]] | 1 | 72 |
// By Atul Rathore
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define f(n) for (int i = 0; i < n; i++)
#define p(x) cout << x << endl;
#define fastio \
ios::sync_with_stdio(false); ... | // By Atul Rathore
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define f(n) for (int i = 0; i < n; i++)
#define p(x) cout << x << endl;
#define fastio \
ios::sync_with_stdio(false); ... | [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78], ["-", 8, 9, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 78 |
n = int(input())
list = {}
for x in range(n):
item = input()
list[item] = x
print(len(lest)) | n = int(input())
list = {}
for x in range(n):
item = input()
list[item] = x
print(len(list))
| [["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 38 |
import collections
N=int(input())
count=0
a=[]
while N>0:
a.append(input())
N=N-1
c=collection.Counter(a)
print(len(c)) | import collections
N=int(input())
count=0
a=[]
while N>0:
a.append(input())
N=N-1
c=collections.Counter(a)
print(len(c)) | [["-", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22]] | 5 | 50 |
N = int(input())
arr = []
for i in range(N):
arr.append(input())
print(len(arr.set())) | N = int(input())
arr = []
for i in range(N):
arr.append(input())
print(len(set(arr))) | [["-", 0, 652, 3, 4, 0, 652, 63, 319, 500, 22], ["-", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 39 |
#include <bits/stdc++.h>
#include <map>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> s(N);
for (int i = 0; i < N; i++) {
cin >> s[i];
}
map<string, int> prize;
for (int i = 0; i < N; i++) {
if (prize[s[i] = 1])
continue;
prize[s[i]] = 1;
}
cout << prize.size(... | #include <bits/stdc++.h>
#include <map>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> s(N);
for (int i = 0; i < N; i++) {
cin >> s[i];
}
map<string, int> prize;
for (int i = 0; i < N; i++) {
if (prize[s[i]] = 1)
continue;
prize[s[i]] = 1;
}
cout << prize.size(... | [["+", 15, 339, 51, 11, 31, 69, 341, 342, 0, 73], ["-", 0, 57, 15, 339, 51, 69, 341, 342, 0, 73]] | 1 | 111 |
from collections import Counter
N = int(input())
S = {}
for i in range(N):
S[i] = input()
print(len(Counter(S.keys()).keys())) | from collections import Counter
N = int(input())
S = {}
for i in range(N):
S[i] = input()
print(len(Counter(S.values()).keys())) | [["-", 500, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 500, 652, 3, 4, 0, 652, 63, 319, 319, 22]] | 5 | 50 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int i, j = 0, b = 0;
cin >> i;
vector<string> S(i);
for (j = 0; j < i; j++) {
cin >> S.at(j);
}
sort(S.begin(), S.end());
for (j = 0; j < (i - 1); j++) {
if (S.at(j) != S.at(j + 1)) {
... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int i, j = 0, b = 1;
cin >> i;
vector<string> S(i);
for (j = 0; j < i; j++) {
cin >> S.at(j);
}
sort(S.begin(), S.end());
for (j = 0; j < (i - 1); j++) {
if (S.at(j) != S.at(j + 1)) {
... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 127 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> S(N);
for (int i = 0; i < N - 1; i++)
cin >> S.at(i);
sort(S.begin(), S.end());
int count = 0;
for (int i = 0; i < N - 2; i++) {
if (S.at(i) == S.at(i + 1))
count++;
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> S(N);
for (int i = 0; i < N; i++)
cin >> S.at(i);
sort(S.begin(), S.end());
int count = 0;
for (int i = 0; i < N - 1; i++) {
if (S.at(i) == S.at(i + 1))
count++;
}
... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 126 |
#include <iostream>
#include <map>
using namespace std;
int main() {
int N;
cin >> N;
map<string, int> S;
string tmp;
cin >> tmp;
S[tmp] = 0;
int n = 1;
for (int i = 1; i < N; i++) {
cin >> tmp;
if (S.count(tmp)) {
S[tmp] = i;
n++;
}
}
cout << n << endl;
} | #include <iostream>
#include <map>
using namespace std;
int main() {
int N;
cin >> N;
map<string, int> S;
string tmp;
cin >> tmp;
S[tmp] = 0;
int n = 1;
for (int i = 1; i < N; i++) {
cin >> tmp;
if (!S.count(tmp)) {
S[tmp] = i;
n++;
}
}
cout << n << endl;
} | [["+", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111]] | 1 | 95 |
n = int(input())
s = (input() for _ in range(n))
print(len(s))
| n = int(input())
s = {input() for _ in range(n)}
print(len(s))
| [["-", 0, 656, 0, 1, 0, 662, 12, 668, 0, 24], ["+", 0, 656, 0, 1, 0, 662, 12, 689, 0, 45], ["-", 12, 668, 0, 659, 12, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 1, 0, 662, 12, 689, 0, 46]] | 5 | 29 |
n = int(input)
ans = len(set([input() for _ in range(n)]))
print(ans) | n = int(input())
ans = len(set([input() for _ in range(n)]))
print(ans) | [["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 30 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.