problem_id stringlengths 6 6 | language stringclasses 2
values | original_status stringclasses 3
values | original_src stringlengths 19 243k | changed_src stringlengths 19 243k | change stringclasses 3
values | i1 int64 0 8.44k | i2 int64 0 8.44k | j1 int64 0 8.44k | j2 int64 0 8.44k | error stringclasses 270
values | stderr stringlengths 0 226k |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02947 | Python | Runtime Error | # -*- coding:utf-8 -*-
import math
N = int(input())
type_dict = {}
for _ in range(N):
s = input()
counts = (
s.count("a"),
s.count("b"),
s.count("c"),
s.count("d"),
s.count("e"),
s.count("f"),
s.count("g"),
s.count("h"),
s.count("i"),
... | # -*- coding:utf-8 -*-
import math
N = int(input())
type_dict = {}
for _ in range(N):
s = input()
counts = (
s.count("a"),
s.count("b"),
s.count("c"),
s.count("d"),
s.count("e"),
s.count("f"),
s.count("g"),
s.count("h"),
s.count("i"),
... | replace | 47 | 48 | 47 | 48 | TypeError: '>' not supported between instances of 'tuple' and 'int' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02947/Python/s779046160.py", line 29, in <module>
print(sum([combinations_count(x, 2) for x in type_dict.items() if x > 1]))
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02947/Python/s... |
p02947 | Python | Runtime Error | from collections import Counter
def main():
n = int(input())
cnt = Counter()
ans = 0
for i in range(n):
s = sorted(input())
if cnt[s] == 0:
cnt[s] = 1
else:
ans += cnt[s]
cnt[s] += 1
print(ans)
if __name__ == "__main__":
main()
| from collections import Counter
def main():
n = int(input())
cnt = Counter()
ans = 0
for i in range(n):
s = "".join(sorted(input()))
if cnt[s] == 0:
cnt[s] = 1
else:
ans += cnt[s]
cnt[s] += 1
print(ans)
if __name__ == "__main__":
ma... | replace | 8 | 10 | 8 | 9 | TypeError: unhashable type: 'list' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02947/Python/s229077088.py", line 20, in <module>
main()
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02947/Python/s229077088.py", line 11, in main
if cnt[s] == 0:
TypeError: unhas... |
p02947 | Python | Time Limit Exceeded | def main():
n = int(input())
s = [""] * n
ans = 0
for i in range(n):
s[i] = SortString(input())
s.sort()
for i in range(n - 1):
for j in range(i + 1, n):
if s[i] == s[j]:
ans += 1
else:
break
print(ans)
def SortString(... | def main():
n = int(input())
s = [""] * n
ans = 0
for i in range(n):
s[i] = SortString(input())
sDictionary = {}
for i in range(n):
if sDictionary.get(s[i]):
ans += sDictionary.get(s[i])
sDictionary[s[i]] += 1
else:
sDictionary[s[i]] = ... | replace | 6 | 13 | 6 | 13 | TLE | |
p02947 | Python | Runtime Error | N = int(input())
ans = 0
S = {}
for i in range(N):
s = "".join(sorted(input()))
if s not in S.keys():
S[s] = 0
continue
print(S)
S[s] += 1
ans += S[s]
print(ans)
| N = int(input())
ans = 0
S = {}
for i in range(N):
s = "".join(sorted(input()))
if s not in S.keys():
S[s] = 0
continue
S[s] += 1
ans += S[s]
print(ans)
| delete | 8 | 9 | 8 | 8 | 0 | |
p02947 | Python | Runtime Error | #!/usr/bin/env python3
acc = [0] * 11
for i in range(10):
acc[i + 1] = acc[i] + (i + 1)
n = int(input())
s = [input() for _ in range(n)]
dic = {}
for i in range(n):
srt = "".join(sorted(s[i]))
dic[srt] = dic[srt] + 1 if srt in dic else 1
ans = 0
for v in dic.values():
ans += acc[v - 1]
print(ans)
| #!/usr/bin/env python3
acc = [0] * (10**5 + 1)
for i in range(10**5):
acc[i + 1] = acc[i] + (i + 1)
n = int(input())
s = [input() for _ in range(n)]
dic = {}
for i in range(n):
srt = "".join(sorted(s[i]))
dic[srt] = dic[srt] + 1 if srt in dic else 1
ans = 0
for v in dic.values():
ans += acc[v - 1]
print... | replace | 1 | 3 | 1 | 3 | 0 | |
p02947 | Python | Time Limit Exceeded | n = int(input())
SET = set()
dict = {}
ans = 0
for i in range(n):
s = list(input())
s.sort()
s = str(s)
if s in SET:
if s in dict:
dict[s] += 1
else:
dict[s] = 1
SET.add(s)
for i in dict.values():
ans += i * (i + 1) // 2
print(ans)
| import sys
input = sys.stdin.readline
n = int(input())
SET = set()
dict = {}
ans = 0
for i in range(n):
s = list(input())
s.sort()
s = str(s)
if s in SET:
if s in dict:
dict[s] += 1
else:
dict[s] = 1
SET.add(s)
for i in dict.values():
ans += i * (i + 1)... | insert | 0 | 0 | 0 | 4 | TLE | |
p02947 | Python | Time Limit Exceeded | x = []
cnt = 0
for _ in range(int(input())):
a = sorted(input())
cnt += x.count(a)
x.append(a)
print(cnt)
| import collections
n = int(input())
x = ["".join(sorted(input())) for _ in range(n)]
a = collections.Counter(x)
print(sum(i * ~-i // 2 for i in a.values()))
| replace | 0 | 7 | 0 | 6 | TLE | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define popb pop_back
#define mem(a, b) memset(a, b, sizeof(a))
#define i first
#define j second
#define inf 2e9
#define MOD 1000... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define popb pop_back
#define mem(a, b) memset(a, b, sizeof(a))
#define i first
#define j second
#define inf 2e9
#define MOD 1000... | replace | 36 | 37 | 36 | 37 | 0 | |
p02947 | C++ | Runtime Error | // #pragma GCC optimize(3)
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#i... | // #pragma GCC optimize(3)
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#i... | replace | 25 | 26 | 25 | 26 | 0 | |
p02947 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#if __has_include("print.hpp")
#include "print.hpp"
#endif
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define MOD 1000000007
typedef long long ll;
typedef pair<int, int> p;
struct U... | #include <bits/stdc++.h>
using namespace std;
#if __has_include("print.hpp")
#include "print.hpp"
#endif
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define MOD 1000000007
typedef long long ll;
typedef pair<int, int> p;
struct U... | replace | 76 | 82 | 76 | 80 | TLE | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
char a[10];
vector<string> s;
string t;
long long n, i, j, ans = 0;
int main() {
cin >> n;
for (j = 0; j < n; j++) {
for (i = 0; i < 10; i++) {
cin >> a[i];
}
sort(a, a + 10);
t = a;
s.push_back(t);
// cout << s;
/*for (i = 0; i < 10; ... | #include <bits/stdc++.h>
using namespace std;
char a[10];
vector<string> s;
string t;
long long n, i, j, ans = 0;
int main() {
cin >> n;
for (j = 0; j < n; j++) {
for (i = 0; i < 10; i++) {
cin >> a[i];
}
sort(a, a + 10);
t = a;
s.push_back(t);
// cout << s;
/*for (i = 0; i < 10; ... | replace | 25 | 26 | 25 | 26 | 0 | |
p02947 | C++ | Time Limit Exceeded | #define _USE_MATH_DEFINES
#include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef long long LL;
typedef vector<int> VI;
typedef vector<double> VD;
t... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef long long LL;
typedef vector<int> VI;
typedef vector<double> VD;
t... | replace | 52 | 57 | 52 | 57 | TLE | |
p02947 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main(void) {
int n;
long long ans = 0;
cin >> n;
string s[n];
for (int i = 0; i < n; i++) {
cin >> s[i];
sort(s[i].begin(), s[i].end());
}
for (int i = 0; i < n - 1; i++) {
for (int j = i + 1; j < n; j++) {
if (s[i] == ... | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main(void) {
int n;
long long ans = 0;
cin >> n;
string s[n];
for (int i = 0; i < n; i++) {
cin >> s[i];
sort(s[i].begin(), s[i].end());
}
sort(s, s + n);
long long x = 0;
for (int i = 1; i < n; i++) {
if (s[i - 1] == s[i... | replace | 13 | 17 | 13 | 25 | TLE | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
vector<string> s(N);
rep(i, N) cin >> s[i];
int ans = 0;
rep(k, N) {
rep(i, 10) {
if (s[1][i] == s[k][i]) {
s[k].erase(s[k].begin() + i);
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
map<string, int> mp;
rep(i, n) {
string s;
cin >> s;
sort(s.begin(), s.end());
mp[s]++;
}
ll ans = 0;
for (auto &p : mp) {
int s = p.second... | replace | 6 | 20 | 6 | 19 | -11 | |
p02947 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// 総数を1000000007(素数)で割った余り
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vec... | #include <bits/stdc++.h>
using namespace std;
// 総数を1000000007(素数)で割った余り
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vec... | replace | 43 | 51 | 43 | 58 | TLE | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "rt", stdin);
freopen("output.txt", "wt", stdout);
#endif
int n;
cin >> n;
string s[n];
ll sum = 0;
map<string, l... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
string s[n];
ll sum = 0;
map<string, ll> mp;
for (int i = 0; i < n; i++) {
cin >> s[i];
sort(s[i].begin(), s[i].end());
if (mp[s... | delete | 7 | 11 | 7 | 7 | -11 | |
p02947 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main(void) {
int n;
cin >> n;
vector<string> s(n);
rep(i, n) cin >> s.at(i);
rep(i, n) { sort(s.at(i).begin(), s.at(i).end()); }
int ans = 0;
rep(i, n - 1) {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main(void) {
int n;
cin >> n;
map<string, int> mp;
rep(i, n) {
string s;
cin >> s;
sort(s.begin(), s.end());
mp[s]++;
}
ll ans = 0;
for (auto &p ... | replace | 9 | 18 | 9 | 20 | TLE | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
vector<string> s(n);
rep(i, n) {
cin >> s[i];
sort(s[i].begin(), s[i].end());
}
sort(s.begin(), s.end());
int c = 0;
int ans = 0;
for (int i = 0; i ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
vector<string> s(n);
rep(i, n) {
cin >> s[i];
sort(s[i].begin(), s[i].end());
}
sort(s.begin(), s.end());
ll c = 0;
ll ans = 0;
rep(i, n - 1) {
... | replace | 14 | 18 | 14 | 18 | 0 | |
p02947 | C++ | Runtime Error | // Garg's Code
#include <bits/stdc++.h>
using namespace std;
#define set set<ll>
#define ll long long
#define ldb long double;
#define pa pair<ll, ll>
// #define map map < ll, ll >
#define vec vector<ll>
#define pb push_back
#define po pop_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second... | // Garg's Code
#include <bits/stdc++.h>
using namespace std;
#define set set<ll>
#define ll long long
#define ldb long double;
#define pa pair<ll, ll>
// #define map map < ll, ll >
#define vec vector<ll>
#define pb push_back
#define po pop_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second... | delete | 36 | 40 | 36 | 36 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
for (int i = 0; i < n; i++) {
cin >> s[i];
sort(s[i].begin(), s[i].end());
}
sort(s.begin(), s.end());
int count = 0;
long long int ans = 0;
//
for (int i = 0; i < n; i++) {
if (s[... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
for (int i = 0; i < n; i++) {
cin >> s[i];
sort(s[i].begin(), s[i].end());
}
sort(s.begin(), s.end());
int count = 0;
long long int ans = 0;
//
for (int i = 1; i < n; i++) {
if (s[... | replace | 25 | 26 | 25 | 26 | 0 | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
#define INF LONG_MAX
#define MOD 1000000007
#define rng(a) a.begin(), a.end()
#define rrng(a) a.end(), a.begin()
#define int ll
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
#define INF LONG_MAX
#define MOD 1000000007
#define rng(a) a.begin(), a.end()
#define rrng(a) a.end(), a.begin()
#define int ll
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
... | replace | 27 | 29 | 27 | 30 | 0 | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
#define INF 1e18
#define int long long
#define Rep(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) Rep(i, 0, n)
#define all(a) (a).begin(), (a).end()
using namespace std;
typedef pair<int, int> P;
typedef pair<int, P> PP;
const int mod = 1000000007;
signed main() {
ios::sync_with_... | #include <bits/stdc++.h>
#define INF 1e18
#define int long long
#define Rep(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) Rep(i, 0, n)
#define all(a) (a).begin(), (a).end()
using namespace std;
typedef pair<int, int> P;
typedef pair<int, P> PP;
const int mod = 1000000007;
signed main() {
ios::sync_with_... | insert | 21 | 21 | 21 | 22 | 0 | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define mod 1000000007
#define f(i, a, b) for (ll i = a; i < b; i++)
#define IOS \
ios::sync_with_stdio(0); \... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define mod 1000000007
#define f(i, a, b) for (ll i = a; i < b; i++)
#define IOS \
ios::sync_with_stdio(0); \... | replace | 47 | 48 | 47 | 48 | 0 | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
typedef int ll;
using namespace __gnu_pbds;
using namespace std;
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define len(v) ((int)v.size())
#define all(v) v.begin(), v.end()
#define os... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
typedef int ll;
using namespace __gnu_pbds;
using namespace std;
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define len(v) ((int)v.size())
#define all(v) v.begin(), v.end()
#define os... | replace | 35 | 36 | 35 | 36 | TLE | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define pb push_back
#define all(v) v.begin(), v.end()
#define fi first
#define se second
#define bigger (char)toupper
#define smaller (char)tolower
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> v... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define pb push_back
#define all(v) v.begin(), v.end()
#define fi first
#define se second
#define bigger (char)toupper
#define smaller (char)tolower
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> v... | replace | 16 | 27 | 16 | 31 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 18446744073709551615) >= this->size() (which is 3)
|
p02947 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int N;
cin >> N;
vector<string> s(N);
rep(i, N) {
cin >> s[i];
sort(s[i].begin(), s[i].end());
}
// sort済みの文字列をソートする
sort(s.begin(), s.end());
ll ans = 0;
for (int ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int N;
cin >> N;
vector<string> s(N);
rep(i, N) {
cin >> s[i];
sort(s[i].begin(), s[i].end());
}
// sort済みの文字列をソートする
sort(s.begin(), s.end());
ll ans = 0;
for (int ... | insert | 22 | 22 | 22 | 25 | TLE | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define boost() \
ios_base ::sync_with_stdio(0); \
cin.tie(); \
cout.tie(); ... | #include <bits/stdc++.h>
#define int long long
#define boost() \
ios_base ::sync_with_stdio(0); \
cin.tie(); \
cout.tie(); ... | replace | 27 | 28 | 27 | 28 | 0 | |
p02947 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
void strsort(std::string &s) {
std::vector<char> tmp;
for (int i = 0; i < s.size(); i++)
tmp.push_back(s[i]);
std::sort(tmp.begin(), tmp.end());
for (int i = 0; i < s.size(); i++)
s[i] = tmp[i];
}
int main() {
int N;
std:... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
void strsort(std::string &s) {
std::vector<char> tmp;
for (int i = 0; i < s.size(); i++)
tmp.push_back(s[i]);
std::sort(tmp.begin(), tmp.end());
for (int i = 0; i < s.size(); i++)
s[i] = tmp[i];
}
int main() {
int N;
std:... | replace | 28 | 29 | 28 | 29 | 0 | |
p02947 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <vector>
#define Max 2 * 100002
using namespace std;
vector<string> vec;
int main() {
int n, i;
string s;
scanf("%d", &n);
for (i = 0; i < n; i++) {
cin >> s;
sort(s.begin(), s.end());
vec.push_back(s);
}
... | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <vector>
#define Max 2 * 100002
using namespace std;
vector<string> vec;
int main() {
int n, i;
string s;
scanf("%d", &n);
for (i = 0; i < n; i++) {
cin >> s;
sort(s.begin(), s.end());
vec.push_back(s);
}
... | replace | 25 | 26 | 25 | 26 | 0 | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long int ll;
using namespace std;
const ll N = 2000009;
const ll p = 31;
const ll m = 1e9 + 7;
const ll inf = 1e14;
ll mod = 1e9 + 7;
ll powm(ll a, ll b) {
ll res = 1;
while (b) {
if (b & 1)
res = (res * a) % mod;
a = (a * a) % mod;
b >>= 1;
}
return res;
... | #include <bits/stdc++.h>
typedef long long int ll;
using namespace std;
const ll N = 2000009;
const ll p = 31;
const ll m = 1e9 + 7;
const ll inf = 1e14;
ll mod = 1e9 + 7;
ll powm(ll a, ll b) {
ll res = 1;
while (b) {
if (b & 1)
res = (res * a) % mod;
a = (a * a) % mod;
b >>= 1;
}
return res;
... | replace | 33 | 37 | 33 | 37 | -11 | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
#include <math.h>
using namespace std;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
int64... | #include <bits/stdc++.h>
#include <iostream>
#include <math.h>
using namespace std;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
int64... | replace | 47 | 48 | 47 | 52 | 0 | |
p02947 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <string>
using ll = long long;
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n;
cin >> n;
map<string, int> x;
rep(i, n) {
string s;
cin >> s;
sort(s.begin(), s.end());
bool fl... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <string>
using ll = long long;
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n;
cin >> n;
map<string, int> x;
rep(i, n) {
string s;
cin >> s;
sort(s.begin(), s.end());
auto it... | replace | 17 | 26 | 17 | 21 | TLE | |
p02947 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>
using namespace std;
using Int = long long;
Int INF = 1LL << 60;
const Int MOD = 1000000007;
int main() {
cin.ti... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>
using namespace std;
using Int = long long;
Int INF = 1LL << 60;
const Int MOD = 1000000007;
int main() {
cin.ti... | replace | 34 | 41 | 34 | 50 | TLE | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
int N;
cin >> N;
vector<string> S(N);
for (int i = 0; i < N; i++) {
cin >> S[i];
}
for (int i = 0; i < N; i++) {
sort(S[i].begin(), S[i].end());
}
sort(S.begin(), S.end());
ll ans = 0;
ll index = 0;
whil... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
int N;
cin >> N;
vector<string> S(N);
for (int i = 0; i < N; i++) {
cin >> S[i];
}
for (int i = 0; i < N; i++) {
sort(S[i].begin(), S[i].end());
}
sort(S.begin(), S.end());
ll ans = 0;
ll index = 0;
whil... | replace | 26 | 27 | 26 | 27 | 0 | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rev(i, n) for (int i = n; i >= 0; i--)
#define Rep(i, m, n) for (int i = m; i < n; i++)
#define repeatrev(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long lon... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rev(i, n) for (int i = n; i >= 0; i--)
#define Rep(i, m, n) for (int i = m; i < n; i++)
#define repeatrev(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long lon... | replace | 131 | 133 | 131 | 141 | -11 | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(v) v.begin(), v.end()
typedef long long ll;
int main() {
int n;
cin >> n;
vector<string> s(n);
rep(i, n) cin >> s[i];
rep(i, n) sort(all(s[i]));
sort(all(s));
ll res = 0;
int i = 0;
while (i ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(v) v.begin(), v.end()
typedef long long ll;
int main() {
int n;
cin >> n;
vector<string> s(n);
rep(i, n) cin >> s[i];
rep(i, n) sort(all(s[i]));
sort(all(s));
ll res = 0;
int i = 0;
while (i ... | replace | 18 | 19 | 18 | 19 | 0 | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, x, n) for (ll i = x; i < n; i++)
#define pb push_back
#define pf push_front
#define ll long long
#define hii cout << "hii" << endl
#define pii pair<int, int>
#define pll pair<ll, ll>
#define int ll
#define mpp make_pair
#define endl '\n'
#define ff first
#de... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, x, n) for (ll i = x; i < n; i++)
#define pb push_back
#define pf push_front
#define ll long long
#define hii cout << "hii" << endl
#define pii pair<int, int>
#define pll pair<ll, ll>
#define int ll
#define mpp make_pair
#define endl '\n'
#define ff first
#de... | replace | 53 | 57 | 53 | 57 | TLE | |
p02947 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define loop(i, first, end) for (int i = (first); i < (end); i++)
#define uint unsigned int
#define ull unsigned long long
#define ll long long
#define vint vector<int>
#define vuint vector<... | #include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <string>
#include <vector>
using namespace std;
#define loop(i, first, end) for (int i = (first); i < (end); i++)
#define uint unsigned int
#define ull unsigned long long
#define ll long long
#define vint vector<int>
#define vuint vector<... | replace | 32 | 38 | 32 | 38 | TLE | |
p02947 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
int N;
cin >> N;
string s[N + 1];
for (int i = 0; i < N; i++)
cin >> s[i];
string aToZ = "abcdefghijklmnopqrstuvwxyz";
map<string, long> anagram_group;
// 文字カウント(24桁の文字にして0~Aまでの文字で各文字の数を表現)
... | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
int N;
cin >> N;
string s[N + 1];
for (int i = 0; i < N; i++)
cin >> s[i];
string aToZ = "abcdefghijklmnopqrstuvwxyz";
map<string, long> anagram_group;
// 文字カウント(24桁の文字にして0~Aまでの文字で各文字の数を表現)
... | replace | 20 | 21 | 20 | 21 | 0 | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const bool DEBUG = false;
int N;
vector<string> s;
void input() {
cin >> N;
s = vector<string>(N);
for (size_t i = 0; i < N; i++)
cin >> s[i];
}
int main(int argc, char const *argv[]) {
input();
for (size_t i = 0; i < N; i++)
sort(s[i].begin(), s[i].e... | #include <bits/stdc++.h>
using namespace std;
const bool DEBUG = false;
int N;
vector<string> s;
void input() {
cin >> N;
s = vector<string>(N);
for (size_t i = 0; i < N; i++)
cin >> s[i];
}
int main(int argc, char const *argv[]) {
input();
for (size_t i = 0; i < N; i++)
sort(s[i].begin(), s[i].e... | replace | 24 | 25 | 24 | 25 | 0 | |
p02947 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
vector<string> s(n);
for (int i = 0; i < n; i++) {
cin >> s.at(i);
sort(s.at(i).begin(), s.at(i).end());
}
ll ans = 0;
for (int i = 0; i < n - 1; i++) {
for (int j = i + 1; j < n; j++) {
if... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
vector<string> s(n);
for (int i = 0; i < n; i++) {
cin >> s.at(i);
sort(s.at(i).begin(), s.at(i).end());
}
ll ans = 0;
sort(s.begin(), s.end());
map<string, int> m;
for (int i = 0; i < n; i++) {
... | replace | 13 | 17 | 13 | 21 | TLE | |
p02947 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<string> s;
int main() {
int N;
long len = 1;
long count = 0;
string in;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> in;
sort(in.begin(), in.begin() + in.size());
s.push_back(in);
}
... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<string> s;
int main() {
int N;
long len = 1;
long count = 0;
string in;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> in;
sort(in.begin(), in.begin() + in.size());
s.push_back(in);
}
... | replace | 21 | 22 | 21 | 22 | 0 | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define all(v) v.begin(), v.end()
#define INF (int)1e16
#define speed \
ios_base::sync_with_stdio(false); \
cin.tie(NU... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define all(v) v.begin(), v.end()
#define INF (int)1e16
#define speed \
ios_base::sync_with_stdio(false); \
cin.tie(NU... | delete | 85 | 89 | 85 | 85 | 0 | |
p02947 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((lint)(x).size())
#define POW2(n) (1LL << (n))
#define FOR(i, begin, end) \
f... | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((lint)(x).size())
#define POW2(n) (1LL << (n))
#define FOR(i, begin, end) \
f... | replace | 37 | 38 | 37 | 38 | 0 | |
p02947 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> all(n);
for (int i = 0; i < n; i++)
cin >> all.at(i);
int count = 0;
int i = 0;
while (i < n) {
string test = all.at(i);
for (int k = i + 1; k < n; k++) {
string cover = all.at(k);
for (int... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
map<string, int> mp;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
sort(s.begin(), s.end());
mp[s]++;
}
long long count = 0;
for (auto &x : mp) {
long long i = x.second;
count += i * (i - 1) / 2;
}
... | replace | 7 | 28 | 7 | 18 | TLE | |
p02947 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define endl "\n"
typedef long long ll;
typedef string str;
const double pi = 3.14159265358979323846;
const long long inf = 1LL << 60;
typedef pair<int, int> P;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const in... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define endl "\n"
typedef long long ll;
typedef string str;
const double pi = 3.14159265358979323846;
const long long inf = 1LL << 60;
typedef pair<int, int> P;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const in... | replace | 268 | 275 | 268 | 278 | TLE | |
p02947 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
long long factorial(long long n) {
if (n == 0) {
return 1;
}
long long ans = 1;
for (int i = 1; i <= n; i++) {
ans *= i;
}
return ans;
}
long long combination(long long n, long long k) {
if (n < k) ... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
long long factorial(long long n) {
if (n == 0) {
return 1;
}
long long ans = 1;
for (int i = 1; i <= n; i++) {
ans *= i;
}
return ans;
}
long long combination(long long n, long long k) {
if (n < k) ... | replace | 24 | 25 | 24 | 30 | 0 | |
p02947 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> s;
string t;
for (int i = 0; i < N; i++) {
cin >> t;
s.push_back(t);
}
for (int i = 0; i < N; i++) {
std::sort(s[i].begin(), s[i].end());
}
st... | #include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> s;
string t;
for (int i = 0; i < N; i++) {
cin >> t;
s.push_back(t);
}
s.push_back("{{{{{{{{{{");
for (int i = 0; i < N; i++) {
std::sort(s[i].be... | insert | 17 | 17 | 17 | 18 | 0 | |
p02947 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
int main(void) {
int n;
std::cin >> n;
std::map<std::string, int> mp;
for (int i = 0; i < n; i++) {
std::string s;
std::cin >> s;
std::sort(s.begin(), s.end());
mp.at(s)++;
}
long long ans = 0;
for (auto &p : mp)... | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
int main(void) {
int n;
std::cin >> n;
std::map<std::string, int> mp;
for (int i = 0; i < n; i++) {
std::string s;
std::cin >> s;
std::sort(s.begin(), s.end());
mp[s]++;
}
long long ans = 0;
for (auto &p : mp) {
... | replace | 15 | 16 | 15 | 16 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): map::at
|
p02948 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
const int INF = 1001001001;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
ll n, m... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
const int INF = 1001001001;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
ll n, m... | insert | 26 | 26 | 26 | 28 | 0 | |
p02948 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, N) f... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, N) f... | replace | 35 | 36 | 35 | 36 | -11 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define mod 1000000007
typedef long long ll;
using namespace std;
int main(void) {
int n, m;
cin >> n >> m;
vector<int> p[m + 1];
rep(i, n) {
int a, b;
cin >> a >> b;
p[a].push_back(b);
}
// rep(i,n) cout << p[i].second << ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define mod 1000000007
typedef long long ll;
using namespace std;
int main(void) {
int n, m;
cin >> n >> m;
vector<int> p[100005];
rep(i, n) {
int a, b;
cin >> a >> b;
p[a].push_back(b);
}
// rep(i,n) cout << p[i].second <<... | replace | 8 | 9 | 8 | 9 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
void solve() {
priority_queue<int> q;
int n, m;
cin >> n >> m;
vector<vector<int>> v(m + 1);
int a, b;
rep(i, n) {
cin >> a >> b;
v[a].push_back(b);
}
ll ans = 0;
for (int i = 0... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
void solve() {
priority_queue<int> q;
int n, m;
cin >> n >> m;
vector<vector<int>> v(m + 1);
int a, b;
rep(i, n) {
cin >> a >> b;
if (a < m + 1) {
v[a].push_back(b);
}
}
... | replace | 13 | 14 | 13 | 16 | 0 | |
p02948 | C++ | Runtime Error | // #include <bits/stdc++.h>
#include <algorithm>
#include <iostream>
#include <array>
#include <bitset>
#include <complex>
#include <cstring>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include... | // #include <bits/stdc++.h>
#include <algorithm>
#include <iostream>
#include <array>
#include <bitset>
#include <complex>
#include <cstring>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include... | replace | 149 | 150 | 149 | 150 | 0 | |
p02948 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> ab(N, vector<int>(2));
for (int i = 0; i < N; i++) {
cin >> ab[i][0] >> ab[i][1];
}
sort(ab.begin(), ab.end());
priority_queue<int> pq;
int s = 0;
int sum = 0;
for (int i = 1; i < M + 1; i++)... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> ab(N, vector<int>(2));
for (int i = 0; i < N; i++) {
cin >> ab[i][0] >> ab[i][1];
}
sort(ab.begin(), ab.end());
priority_queue<int> pq;
int s = 0;
int sum = 0;
for (int i = 1; i < M + 1; i++)... | insert | 19 | 19 | 19 | 21 | TLE | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep3(i, l, n) for (int i = l; i < (n); ++i)
#define sz(v) (int)v.size()
const ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep3(i, l, n) for (int i = l; i < (n); ++i)
#define sz(v) (int)v.size()
const ... | insert | 88 | 88 | 88 | 90 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef long double LD;
typedef unsigned long long ULL;
#ifdef _LOCAL
struct Tester {
Tester() { freopen("sample.in", "r", stdin); }
~Tester() {
fprintf(stderr, "\nTime: %d ms\n", int(1000.0 * clock() / CLOCKS_PER_SEC));
}
} _tester;
#endif... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef long double LD;
typedef unsigned long long ULL;
#ifdef _LOCAL
struct Tester {
Tester() { freopen("sample.in", "r", stdin); }
~Tester() {
fprintf(stderr, "\nTime: %d ms\n", int(1000.0 * clock() / CLOCKS_PER_SEC));
}
} _tester;
#endif... | replace | 57 | 58 | 57 | 59 | 0 | |
p02948 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
int dx[] = {... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
int dx[] = {... | replace | 43 | 44 | 43 | 45 | TLE | |
p02948 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <vector>
using namespace std;
typedef long long int ll;
#define rep(i, a, n) for (ll i = a; i < (ll)(n); i++)
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
lon... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <vector>
using namespace std;
typedef long long int ll;
#define rep(i, a, n) for (ll i = a; i < (ll)(n); i++)
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
lon... | replace | 17 | 18 | 17 | 18 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int int64_t
using namespace std;
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, m;
cin >> n >> m;
priority_queue<int> q;
vector<vector<int>> v(m + 1);
for (int i = 0; i < n; ++i) {
int a, b;
cin >> a >> b;
v[a].emplace_back(b);
}
... | #include <bits/stdc++.h>
#define int int64_t
using namespace std;
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, m;
cin >> n >> m;
priority_queue<int> q;
vector<vector<int>> v(m + 1);
for (int i = 0; i < n; ++i) {
int a, b;
cin >> a >> b;
if (a <= m)
v[a].emp... | replace | 15 | 16 | 15 | 17 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define M 100005
struct D {
int x, y;
bool operator<(D a) const { return y == a.y ? x < a.x : y > a.y; }
} A[M];
int n, m, F[M];
int gf(int x) { return x == F[x] ? x : F[x] = gf(F[x]); }
int main() {
cin >> n >> m;
for (int i = 1; i <= n; ++i)
scanf("%d%d", &A[i... | #include <bits/stdc++.h>
using namespace std;
#define M 100005
struct D {
int x, y;
bool operator<(D a) const { return y == a.y ? x < a.x : y > a.y; }
} A[M];
int n, m, F[M];
int gf(int x) { return x == F[x] ? x : F[x] = gf(F[x]); }
int main() {
cin >> n >> m;
for (int i = 1; i <= n; ++i)
scanf("%d%d", &A[i... | insert | 19 | 19 | 19 | 21 | 0 | |
p02948 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int main() {
int n, m;
cin >> n >> m;
vector<pair<ll, ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int main() {
int n, m;
cin >> n >> m;
vector<pair<ll, ... | replace | 27 | 28 | 27 | 28 | 0 | |
p02948 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include... | insert | 106 | 106 | 106 | 108 | 0 | |
p02948 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
#define sync \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define input(arr, n) ... | #include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
#define sync \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define input(arr, n) ... | replace | 50 | 51 | 50 | 51 | TLE | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ld double
#define ull unsigned long long
#define ll long long
#define pii pair<int, int>
#define iiii pair<int, pii>
#define mp make_pair
#define INF 1000000000
#define MOD 1000000007
#define rep(i, x) for (int(i) = 0; (i) < (x); (i)++)
inline int getint() {
int x = 0, p = 1;
char c... | #include <bits/stdc++.h>
#define ld double
#define ull unsigned long long
#define ll long long
#define pii pair<int, int>
#define iiii pair<int, pii>
#define mp make_pair
#define INF 1000000000
#define MOD 1000000007
#define rep(i, x) for (int(i) = 0; (i) < (x); (i)++)
inline int getint() {
int x = 0, p = 1;
char c... | replace | 34 | 35 | 34 | 36 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define ll long long
#define lld long double
#define ALL(x) x.begin(), x.end()
using n... | #include <bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define ll long long
#define lld long double
#define ALL(x) x.begin(), x.end()
using n... | replace | 26 | 27 | 26 | 27 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ms(x, n) memset(x, n, sizeof(x));
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define rep1(i, n) for (int i = 1; i <= (int)n; ++i)
#define pb push_back
#define PI acos(-1.0)
#define LONG_LONG_MAX 9223372036854775807
#define LONG_LONG_MIN -9223372036854775808
typedef long long int... | #include <bits/stdc++.h>
#define ms(x, n) memset(x, n, sizeof(x));
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define rep1(i, n) for (int i = 1; i <= (int)n; ++i)
#define pb push_back
#define PI acos(-1.0)
#define LONG_LONG_MAX 9223372036854775807
#define LONG_LONG_MIN -9223372036854775808
typedef long long int... | replace | 24 | 25 | 24 | 26 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, x, n) for (int i = x; i < (n); i++)
#define ALL(n) begin(n), end(n)
struct cww {
cww() {
ios::sync_with_stdio(false);
cin.tie(0);
}
} star;
const long long INF = numeric_limits<long long>::max();
te... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, x, n) for (int i = x; i < (n); i++)
#define ALL(n) begin(n), end(n)
struct cww {
cww() {
ios::sync_with_stdio(false);
cin.tie(0);
}
} star;
const long long INF = numeric_limits<long long>::max();
te... | replace | 31 | 32 | 31 | 32 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define rep(i, n) for (int i = 0; i < n; ++i)
int main() {
int n, m;
cin >> n >> m;
int cnt = 0;
vector<vector<int>> w(m);
priority_queue<int> que;
rep(i, n) {
int a, b;
cin >> ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define rep(i, n) for (int i = 0; i < n; ++i)
int main() {
int n, m;
cin >> n >> m;
int cnt = 0;
vector<vector<int>> w(m + 2);
priority_queue<int> que;
rep(i, n) {
int a, b;
cin... | replace | 11 | 12 | 11 | 12 | -11 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> jobs[m];
rep(i, n) {
int a, b;
cin >> a >> b;
if (a > m)
continue;
jobs[m - a].push_back(b);
}
priority_queue<int> p;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> jobs[m];
rep(i, n) {
int a, b;
cin >> a >> b;
if (a > m)
continue;
jobs[m - a].push_back(b);
}
priority_queue<int> p;
... | replace | 19 | 20 | 19 | 20 | -11 | |
p02948 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
typedef pair<int, int> P;
vector<int> t[100002];
int main() {
int n, m;
cin >> n >> m;
for ... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
typedef pair<int, int> P;
vector<int> t[100002];
int main() {
int n, m;
cin >> n >> m;
for ... | replace | 24 | 25 | 24 | 27 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h> // include all standard C++ libraries
using namespace std;
// Loops
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define _rrep(i, n) rrepi(i, n, 0)
#define rrepi(i, a, b) for (int i = int(a) - 1; i ... | #include <bits/stdc++.h> // include all standard C++ libraries
using namespace std;
// Loops
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define _rrep(i, n) rrepi(i, n, 0)
#define rrepi(i, a, b) for (int i = int(a) - 1; i ... | replace | 113 | 114 | 113 | 114 | 0 | |
p02948 | C++ | Runtime Error | #include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <vector>
std::priority_queue<int> A;
std::vector<int> B[10005];
int main() {
int N, M;
scanf("%d %d", &N, &M);
int temp1, temp2;
for (int i = 0; i < N; i++) {
scanf("%d %d", &temp1, &temp2);
B[temp1].push_back(temp2);
}
... | #include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <vector>
std::priority_queue<int> A;
std::vector<int> B[100005];
int main() {
int N, M;
scanf("%d %d", &N, &M);
int temp1, temp2;
for (int i = 0; i < N; i++) {
scanf("%d %d", &temp1, &temp2);
B[temp1].push_back(temp2);
}
... | replace | 7 | 8 | 7 | 8 | 0 | |
p02948 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
const int N = 100001;
const int M = 100001;
struct S {
int a, b;
S(int _a, int _b) {
a = _a;
b = _b;
}
bool operator<(const S &o) const { ret... | #include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
const int N = 100001;
const int M = 100001;
struct S {
int a, b;
S(int _a, int _b) {
a = _a;
b = _b;
}
bool operator<(const S &o) const { ret... | replace | 46 | 48 | 46 | 50 | -11 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = (int)(n); i >= 0; i--)
#define all(v) v.begin(), v.end()
typedef long long ll;
int main() {
int N, M;
cin >> N >> M;
vector<pair<int, int>> vec(N);
rep(i, N) { cin >> vec[i].first ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = (int)(n); i >= 0; i--)
#define all(v) v.begin(), v.end()
typedef long long ll;
int main() {
int N, M;
cin >> N >> M;
vector<pair<int, int>> vec(N);
rep(i, N) { cin >> vec[i].first ... | replace | 14 | 15 | 14 | 15 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long unsigned int ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define rep(i, start, end) for (int i = start; i < (int)(end); ++i)
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> jobs(m);
rep(i, 0, n) {
int a, b;
cin ... | #include <bits/stdc++.h>
using namespace std;
typedef long long unsigned int ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define rep(i, start, end) for (int i = start; i < (int)(end); ++i)
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> jobs(m);
rep(i, 0, n) {
int a, b;
cin ... | insert | 14 | 14 | 14 | 16 | 0 | |
p02948 | C++ | Runtime Error |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<int>;
using VL = vector<ll>;
using VS = vector<string>;
using VB = vector<bool>;
using VVI = vector<VI>;
using VVL = vector<VL>;
using PII = std::pair<int, int>;
using PLL = std::pair<ll, ll>;
#define rep(i, n) for (int i = 0; i < ... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<int>;
using VL = vector<ll>;
using VS = vector<string>;
using VB = vector<bool>;
using VVI = vector<VI>;
using VVL = vector<VL>;
using PII = std::pair<int, int>;
using PLL = std::pair<ll, ll>;
#define rep(i, n) for (int i = 0; i < ... | replace | 177 | 178 | 177 | 178 | 0 | |
p02948 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
struct node {
int index;
int time;
int cost;
};
struct CustomCompare {
bool operator()(const node &l, const node &r) {
if (... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
struct node {
int index;
int time;
int cost;
};
struct CustomCompare {
bool operator()(const node &l, const node &r) {
if (... | replace | 39 | 40 | 39 | 42 | 0 | |
p02948 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
ll a, b, n, m, tmp, sum = 0, day, ad;
cin >> n >> m;
vector<ll> n_list[10001];
day = 0;
priority_queue<ll> que;
for (int i = 0; i < n; i++) {
cin >> a >>... | #include <algorithm>
#include <iostream>
#include <queue>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
ll a, b, n, m, tmp, sum = 0, day, ad;
cin >> n >> m;
vector<ll> n_list[100001];
day = 0;
priority_queue<ll> que;
for (int i = 0; i < n; i++) {
cin >> a >... | replace | 10 | 11 | 10 | 11 | 0 | |
p02948 | C++ | Time Limit Exceeded | #include <iostream>
#include <queue>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> v[M];
int A, B;
for (int i = 0; i < N; ++i) {
cin >> A >> B;
if (A > M)
continue;
v[A - 1].push_back(B);
}
priority_queue<int> que;
int ans = 0;
for (int i = 0; i < M; ++i) {... | #include <iostream>
#include <queue>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> v(M);
int A, B;
for (int i = 0; i < N; ++i) {
cin >> A >> B;
if (A > M)
continue;
v[A - 1].push_back(B);
}
priority_queue<int> que;
int ans = 0;
for (int i = 0; i < M... | replace | 8 | 9 | 8 | 9 | TLE | |
p02948 | C++ | Runtime Error | //============================================================================
// Name : d.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostrea... | //============================================================================
// Name : d.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostrea... | replace | 20 | 21 | 20 | 23 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
ll ans = 0;
vector<vector<int>> table(m + 1, vector<int>());
rep(i, n) {
int a, b;
cin >> a >> b;
table[a].push_back(b);
}
priority_queue<i... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
ll ans = 0;
vector<vector<int>> table(m + 1, vector<int>());
rep(i, n) {
int a, b;
cin >> a >> b;
if (a <= m)
table[a].push_back(b);
}
... | replace | 13 | 14 | 13 | 15 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mp make_pair
typedef long long ll;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
re... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mp make_pair
typedef long long ll;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
re... | insert | 31 | 31 | 31 | 33 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> jobs(M);
for (int i = 0; i < N; i++) {
int a, b;
cin >> a >> b;
jobs[M - a].push_back(b);
}
long long int ans = 0;
priority_queue<int> pqueue;
for (int i = 1; i <= M; i++) {
for (int... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> jobs(M);
for (int i = 0; i < N; i++) {
int a, b;
cin >> a >> b;
if (a > M)
continue;
jobs[M - a].push_back(b);
}
long long int ans = 0;
priority_queue<int> pqueue;
for (int i =... | insert | 11 | 11 | 11 | 13 | 0 | |
p02948 | C++ | Runtime Error | /*by freesteed*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define pb push_back
#define fill(x, c) memset(x, c, sizeof(x))
#define fi first
#define se second
#define sz(A) (int)(A.size())
#define all(x) (x).begin(), (x).end()
#define caset ... | /*by freesteed*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define pb push_back
#define fill(x, c) memset(x, c, sizeof(x))
#define fi first
#define se second
#define sz(A) (int)(A.size())
#define all(x) (x).begin(), (x).end()
#define caset ... | replace | 49 | 51 | 49 | 53 | -11 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
#define hell 1000000007
#define M 1000000007
#define Maxi 10000000000000000
#define lcm(a, b) (a * b) / __gcd(a, b)
#define ll long long
#define vll vector<ll>
#define vi vector<long long>
#define pll vector<pair<ll, ll>>
#define pb push_back
// #define mp make_pair
#... | #include <bits/stdc++.h>
#define hell 1000000007
#define M 1000000007
#define Maxi 10000000000000000
#define lcm(a, b) (a * b) / __gcd(a, b)
#define ll long long
#define vll vector<ll>
#define vi vector<long long>
#define pll vector<pair<ll, ll>>
#define pb push_back
// #define mp make_pair
#... | replace | 83 | 85 | 83 | 88 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define len(v) ll(v.size())
#define fi first
#define se second
template <class T> void cout_vec(const vector<T> &vec) {
for (auto it... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define len(v) ll(v.size())
#define fi first
#define se second
template <class T> void cout_vec(const vector<T> &vec) {
for (auto it... | insert | 29 | 29 | 29 | 31 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (n); i++)
#define rep(i, n) REP(i, 0, n)
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int inf = 1e9 + 7;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> vv(m + 1);
rep(i, n) {
... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (n); i++)
#define rep(i, n) REP(i, 0, n)
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int inf = 1e9 + 7;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> vv(m + 1);
rep(i, n) {
... | replace | 15 | 16 | 15 | 17 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> jobs(m);
rep(i, n) {
int a, b;
cin >> a >> b;
if (a > m)
continue;
jobs[m - a].push_back(b);
}
priority_queue<in... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> jobs(m);
rep(i, n) {
int a, b;
cin >> a >> b;
if (a > m)
continue;
jobs[m - a].push_back(b);
}
priority_queue<in... | replace | 23 | 24 | 23 | 24 | -11 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
#define ll long long int
priority_queue<int> q;
vector<int> v[10001];
int main() {
ll N, M;
ll a, b;
cin >> N >> M;
rep(i, N) {
cin >> a >> b;
v[a].push_back(b);
}
ll res = 0;
for (int i = M; i >= 1; i--)... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
#define ll long long int
priority_queue<int> q;
vector<int> v[1000005];
int main() {
ll N, M;
ll a, b;
cin >> N >> M;
rep(i, N) {
cin >> a >> b;
v[a].push_back(b);
}
ll res = 0;
for (int i = M; i >= 1; i-... | replace | 6 | 7 | 6 | 7 | 0 | |
p02948 | C++ | Runtime Error | #ifdef LOCAL
#pragma GCC optimize("O0")
#else
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx")
#endif
#include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <st... | #ifdef LOCAL
#pragma GCC optimize("O0")
#else
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx")
#endif
#include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <st... | insert | 390 | 390 | 390 | 392 | 0 | |
p02948 | C++ | Runtime Error | #include <iostream>
#include <queue>
using namespace std;
int n;
int m;
priority_queue<int> que;
vector<int> t[100005];
int main() {
ios::sync_with_stdio(false);
cin >> n >> m;
for (int i = 1, c, v; i <= n; ++i) {
cin >> c >> v;
t[m - c + 1].push_back(v);
}
int ans = 0;
for (int i = m; i >= 1; ... | #include <iostream>
#include <queue>
using namespace std;
int n;
int m;
priority_queue<int> que;
vector<int> t[100005];
int main() {
ios::sync_with_stdio(false);
cin >> n >> m;
for (int i = 1, c, v; i <= n; ++i) {
cin >> c >> v;
if (m - c + 1 >= 1) {
t[m - c + 1].push_back(v);
}
}
int a... | replace | 16 | 17 | 16 | 19 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> vvi(m + 1);
int a, b;
for (int i = 0; i < n; i++) {
cin >> a >> b;
vvi[a].push_back(b);
}
int w = 0;
priority_queue<int> pq;
for (int i = 1; i <= m; i++) {
for (int x : vvi[i]) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> vvi(m + 1);
int a, b;
for (int i = 0; i < n; i++) {
cin >> a >> b;
if (a > m)
continue;
vvi[a].push_back(b);
}
int w = 0;
priority_queue<int> pq;
for (int i = 1; i <= m; i++) {
... | insert | 10 | 10 | 10 | 12 | 0 | |
p02948 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <string>
#include <vector>
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <string>
#include <vector>
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | replace | 60 | 64 | 60 | 61 | 0 | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
using namespace std;
template <class T> inline bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
}
retur... | #include <bits/stdc++.h>
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
using namespace std;
template <class T> inline bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return 1;
}
retur... | replace | 39 | 41 | 39 | 43 | -11 | |
p02948 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
bool compare(pair<int, int> a, pair<int, int> b) {
if (a.first == b.first)
return a.second < b.second;
else
return a.first < b.first;
}
int main() {
int n, m;
cin >> n >> m;
vector<pair<int, int>> a(n);
... | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
bool compare(pair<int, int> a, pair<int, int> b) {
if (a.first == b.first)
return a.second < b.second;
else
return a.first < b.first;
}
int main() {
int n, m;
cin >> n >> m;
vector<pair<int, int>> a(n);
... | replace | 21 | 22 | 21 | 22 | 0 | |
p02948 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
const long long MOD = 1000000007;
using namespace std;
typedef long long llong;
// int isalpha(char ch): ch がアルファベットな... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
const long long MOD = 1000000007;
using namespace std;
typedef long long llong;
// int isalpha(char ch): ch がアルファベットな... | insert | 87 | 87 | 87 | 88 | TLE | |
p02948 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
#define rep(i, n) for (int i = 0; i... | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
#define rep(i, n) for (int i = 0... | replace | 0 | 1 | 0 | 1 | TLE | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ipair;
#define pb push_back
#define MP make_pair
#define ff first
#define ss second
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define ABS(x) ((x) < 0 ? -(x) : (x))
ll mod = 1000000007;... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ipair;
#define pb push_back
#define MP make_pair
#define ff first
#define ss second
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define ABS(x) ((x) < 0 ? -(x) : (x))
ll mod = 1000000007;... | replace | 17 | 21 | 17 | 18 | TLE | |
p02948 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
long N, M;
cin >> N >> M;
vector<vector<long>> v(M + 2);
priority_queue<long> q;
long A;
int B;
for (long i = 0; i < N; i++) {
cin >> A >> B;
v[A].push_back(B);
}
long long t = 0;
... | #include <bits/stdc++.h>
using namespace std;
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
long N, M;
cin >> N >> M;
vector<vector<long>> v(100010);
priority_queue<long> q;
long A;
int B;
for (long i = 0; i < N; i++) {
cin >> A >> B;
v[A].push_back(B);
}
long long t = 0;
... | replace | 10 | 11 | 10 | 11 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.