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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <type_traits>
using namespace std;
using ll = int64_t;
#define int ll
#define FOR(i, a, b) for (int i = int(a); i < int(b); i++)
#define REP(i, b) FOR(i, 0, b)
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define ALL(x) x.begin(), x.end()
using pi = pair<int, in... | #include <bits/stdc++.h>
#include <type_traits>
using namespace std;
using ll = int64_t;
#define int ll
#define FOR(i, a, b) for (int i = int(a); i < int(b); i++)
#define REP(i, b) FOR(i, 0, b)
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define ALL(x) x.begin(), x.end()
using pi = pair<int, in... | replace | 117 | 118 | 117 | 118 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
for (int i = 0; i < h; ++i)
cin >> s[i];
vector<vector<int>> cnt(h, vector<int>(w));
for (int i = 0; i < h; ++i) {
vector<int> done(w);
... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
for (int i = 0; i < h; ++i)
cin >> s[i];
vector<vector<int>> cnt(h, vector<int>(w));
for (int i = 0; i < h; ++i) {
vector<int> done(w);
... | replace | 36 | 37 | 36 | 37 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 5;
int preC[maxn][maxn], preR[maxn][maxn];
int main() {
int h, w;
cin >> h >> w;
vector<string> a(h);
for (int i = 0; i < h; i++) {
cin >> a[i];
}
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (a[i][j] != ... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 5;
int preC[maxn][maxn], preR[maxn][maxn];
int main() {
int h, w;
cin >> h >> w;
vector<string> a(h);
for (int i = 0; i < h; i++) {
cin >> a[i];
}
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (a[i][j] != ... | replace | 4 | 5 | 4 | 5 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
int light[h][w];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
light[i][j] = 0;
}
}
for (int i = 0; i < h; i++) {
cin >> s[i];
}
for (int i = 0; i < h; i++) {
v... | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
int light[h][w];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
light[i][j] = 0;
}
}
for (int i = 0; i < h; i++) {
cin >> s[i];
}
for (int i = 0; i < h; i++) {
v... | replace | 35 | 36 | 35 | 36 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "... | replace | 16 | 17 | 16 | 17 | 0 | |
p03014 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
/*2進数配列+1*/
vector<int> twoadd(vector<int> v, int N) {
v[N - 1] += 1;
int ind = N - 1;
int j = N - 1;
for (j = N - 1; j >= 1; j--) {
if (v[j] > 1) {
v[j - 1] += 1;
v[j] = 0;
}
}
return v;
}
/*フィボナッチ*/
long long fibonatti(long long d) {
long... | #include <bits/stdc++.h>
using namespace std;
/*2進数配列+1*/
vector<int> twoadd(vector<int> v, int N) {
v[N - 1] += 1;
int ind = N - 1;
int j = N - 1;
for (j = N - 1; j >= 1; j--) {
if (v[j] > 1) {
v[j - 1] += 1;
v[j] = 0;
}
}
return v;
}
/*フィボナッチ*/
long long fibonatti(long long d) {
long... | insert | 87 | 87 | 87 | 90 | TLE | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include ... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include ... | replace | 191 | 195 | 191 | 195 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, x) for (int i = 0; i < (int)(x); i++)
#define r... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, x) for (int i = 0; i < (int)(x); i++)
#define r... | replace | 61 | 62 | 61 | 62 | 0 | |
p03014 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
const int MAX_H = 2000;
const int MAX_W = 2000;
int H, W, v[MAX_H][MAX_W], h[MAX_H][MAX_W];
string M[MAX_H];
int dfs_v(int y, int x, int num) {
if (v[y][x] != 0)
return v[y][x];
if (M[y][x] == '#' || y >= H)
return num;
return v[y][x] = dfs_v(y ... | #include <iostream>
#include <string>
using namespace std;
const int MAX_H = 2010;
const int MAX_W = 2010;
int H, W, v[MAX_H][MAX_W], h[MAX_H][MAX_W];
string M[MAX_H];
int dfs_v(int y, int x, int num) {
if (v[y][x] != 0)
return v[y][x];
if (M[y][x] == '#' || y >= H)
return num;
return v[y][x] = dfs_v(y ... | replace | 4 | 6 | 4 | 6 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int H, W, x = 0, y = 0;
cin >> H >> W;
vector<string> S(H);
int a[200][200] = {... | #include <algorithm>
#include <bitset>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int H, W, x = 0, y = 0;
cin >> H >> W;
vector<string> S(H);
int a[2001][2001] =... | replace | 17 | 18 | 17 | 18 | 0 | |
p03014 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#pragma warning(disable : 4996)
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#includ... | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#pragma warning(disable : 4996)
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#includ... | replace | 57 | 58 | 57 | 58 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define mx 100000
int main() {
int n, m;
cin >> n >> m;
char ar[n + 2][m + 2];
for (int i = 1; i <= n; i++) {
scanf("%s", ar[i] + 1);
}
int row[n + 2][m + 2];
int col[n + 2][m + 2];
memset(row, 0, sizeof row);
memset(col, 0, sizeof col);
for (... | #include <bits/stdc++.h>
using namespace std;
#define mx 100000
int main() {
int n, m;
cin >> n >> m;
char ar[n + 2][m + 2];
for (int i = 1; i <= n; i++) {
scanf("%s", ar[i] + 1);
}
int row[n + 2][m + 2];
int col[n + 2][m + 2];
memset(row, 0, sizeof row);
memset(col, 0, sizeof col);
for (... | replace | 45 | 46 | 45 | 46 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int h, w;
int i, j, k;
cin >> h >> w;
vector<string> s(h);
for (i = 0; i < h; ++i) {
cin >> s.at(i);
}
vector<vector<int>> tate(h, vector<int>(w, 0));
vector<vector<int>> yoko(h, vector<int>(w, 0));
for (i = 0; i < ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int h, w;
int i, j, k;
cin >> h >> w;
vector<string> s(h);
for (i = 0; i < h; ++i) {
cin >> s.at(i);
}
vector<vector<int>> tate(h, vector<int>(w, 0));
vector<vector<int>> yoko(h, vector<int>(w, 0));
for (i = 0; i < ... | replace | 50 | 51 | 50 | 51 | 0 | |
p03014 | 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 INT_MAX
#define MOD 1000000007
#define rng(a) a.begin(), a.end()
#define rrng(a) a.end(), a.begin()
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int H, W;
cin ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
#define INF INT_MAX
#define MOD 1000000007
#define rng(a) a.begin(), a.end()
#define rrng(a) a.end(), a.begin()
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int H, W;
cin ... | replace | 75 | 76 | 75 | 76 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <iostream>
#include <map>
#include <vector>
static const int IINF = 1 << 30;
static const long long LINF = 1LL << 60;
static const long long MOD = 1.0e+9 + 7;
template <typename T> std::vector<T> vectors(std::size_t n, T val) {
return std::vector<T>(n, val);
}
templ... | #include <algorithm>
#include <cassert>
#include <iostream>
#include <map>
#include <vector>
static const int IINF = 1 << 30;
static const long long LINF = 1LL << 60;
static const long long MOD = 1.0e+9 + 7;
template <typename T> std::vector<T> vectors(std::size_t n, T val) {
return std::vector<T>(n, val);
}
templ... | replace | 67 | 68 | 67 | 68 | -6 | free(): invalid next size (fast)
|
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 2000;
int n, m;
int s[MAXN][MAXN], s1[MAXN][MAXN];
int t[MAXN][MAXN], t1[MAXN][MAXN];
char str[MAXN][MAXN];
int main() {
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++)
scanf("%s", str[i] + 1);
for (int i = 1; i <= n; i++) {
for (int j = 1... | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 4000;
int n, m;
int s[MAXN][MAXN], s1[MAXN][MAXN];
int t[MAXN][MAXN], t1[MAXN][MAXN];
char str[MAXN][MAXN];
int main() {
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++)
scanf("%s", str[i] + 1);
for (int i = 1; i <= n; i++) {
for (int j = 1... | replace | 2 | 3 | 2 | 3 | 0 | |
p03014 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define INF 2147483647
#define INFF 9223372036854775807
#define ll long long
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPP(i, m, n) for (int i = m; i < n; i++)
#define ALL(N) (N.begin(), N.end())
#define de cout << "debug" << endl;
#define pb push_back
template... | #include <bits/stdc++.h>
using namespace std;
#define INF 2147483647
#define INFF 9223372036854775807
#define ll long long
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPP(i, m, n) for (int i = m; i < n; i++)
#define ALL(N) (N.begin(), N.end())
#define de cout << "debug" << endl;
#define pb push_back
template... | insert | 87 | 87 | 87 | 91 | TLE | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> S(H);
for (int i = 0; i < H; i++) {
cin >> S[i];
}
vector<vector<int>> L(H, vector<int>(W));
vector<vector<int>> R(H, vector<int>... | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
vector<string> S(H);
for (int i = 0; i < H; i++) {
cin >> S[i];
}
vector<vector<int>> L(H, vector<int>(W));
vector<vector<int>> R(H, vector<int>... | replace | 65 | 66 | 65 | 66 | -11 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina... | replace | 55 | 56 | 55 | 56 | -11 | |
p03014 | 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;
int main() {
int h, w;
cin >> h >> w;
int a[2003][2003];
rep(i, h) {
string s;
cin >> s;
rep(j, w) {
if (s[j] == '#')
a[i][j] = 0;
else
a[i][j] = 1;
}
... | #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 h, w;
cin >> h >> w;
int a[2003][2003];
rep(i, h) {
string s;
cin >> s;
rep(j, w) {
if (s[j] == '#')
a[i][j] = 0;
else
a[i][j] = 1;
}
... | replace | 49 | 50 | 49 | 50 | TLE | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int h, w, f, s, k, ans = 0;
cin >> h >> w;
char a[h][w];
int b[h][w];
fill((int *)b, (int *)b[h], 0);
rep(i, h) scanf("%s", a[i]);
rep(i, h) {
f = -1;
s = 0;
rep(j, w) {
if (a[... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int h, w, f, s, k, ans = 0;
cin >> h >> w;
char a[h + 10][w + 10];
int b[h][w];
fill((int *)b, (int *)b[h], 0);
rep(i, h) scanf("%s", a[i]);
rep(i, h) {
f = -1;
s = 0;
rep(j, w) {
... | replace | 6 | 7 | 6 | 7 | 0 | |
p03014 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define int long long // <-----!!!!!!!!!!!!!!!!!!!
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define rrep2(i, a, b) for (int i = (a)-1; i >= b; i--)
#define chmi... | #include "bits/stdc++.h"
using namespace std;
#define int long long // <-----!!!!!!!!!!!!!!!!!!!
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define rrep2(i, a, b) for (int i = (a)-1; i >= b; i--)
#define chmi... | replace | 55 | 56 | 55 | 56 | -11 | |
p03014 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < n; i++)
#define mod 1000000007 // 10^9+7
#define INF 99999999999 // 10^12-1
#define dev 998244353 // tenka1
#define P pair<int, int>
#define F first
#define S second
int w, h, ans = 0;... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < n; i++)
#define mod 1000000007 // 10^9+7
#define INF 99999999999 // 10^12-1
#define dev 998244353 // tenka1
#define P pair<int, int>
#define F first
#define S second
int w, h, ans = 0;... | replace | 24 | 44 | 24 | 58 | TLE | |
p03014 | Python | Runtime Error | import sys
import numpy as np
def read():
return sys.stdin.readline().rstrip()
def main():
h, w = map(int, read().split())
s = np.array([[i == "." for i in read()] for _ in range(h)], dtype=int)
left = s.copy()
right = s.copy
up = s.copy
down = s.copy
for i in range(w - 1):
l... | import sys
import numpy as np
def read():
return sys.stdin.readline().rstrip()
def main():
h, w = map(int, read().split())
s = np.array([[i == "." for i in read()] for _ in range(h)], dtype=int)
left = s.copy()
right = s.copy()
up = s.copy()
down = s.copy()
for i in range(w - 1):
... | replace | 12 | 15 | 12 | 15 | TLE | |
p03014 | Python | Runtime Error | #!/usr/bin/env python3
import sys
try:
from typing import List
except ImportError:
pass
def solve(H: int, W: int, S: "List[str]"):
d = [[0] * W for _ in range(H)]
for y in range(H):
x = 0
while x < W:
while x < W and S[y][x] == "#":
x += 1
xstt ... | #!/usr/bin/env python3
import sys
try:
from typing import List
except ImportError:
pass
def solve(H: int, W: int, S: "List[str]"):
d = [[0] * W for _ in range(H)]
for y in range(H):
x = 0
while x < W:
while x < W and S[y][x] == "#":
x += 1
xstt ... | replace | 22 | 23 | 22 | 23 | 0 | |
p03014 | Python | Time Limit Exceeded | H, W = map(int, input().split())
MAP = [[] for _ in range(H)]
L = [[[] for h in range(W)] for _ in range(H)]
R = [[[] for h in range(W)] for _ in range(H)]
D = [[[] for h in range(W)] for _ in range(H)]
U = [[[] for h in range(W)] for _ in range(H)]
for i in range(H):
MAP[i] = list(input())
for i in range(H):
... | H, W = map(int, input().split())
MAP = [list(input()) for _ in range(H)]
L = [[0] * W for _ in range(H)]
R = [[0] * W for _ in range(H)]
D = [[0] * W for _ in range(H)]
U = [[0] * W for _ in range(H)]
for i in range(H):
for j in range(W):
if MAP[i][j] == "#":
L[i][j] = 0
elif j == 0:
... | replace | 1 | 9 | 1 | 6 | TLE | |
p03014 | Python | Runtime Error | from collections import defaultdict
H, W = map(int, input().split())
mass = list()
for i in range(H):
mass.append(input())
values_col = defaultdict(int)
values_row = defaultdict(int)
ind_row = [[0 for i in range(H)] for j in range(W)]
ind_col = [[0 for i in range(H)] for j in range(W)]
ind = 0
for i, m_row in ... | from collections import defaultdict
H, W = map(int, input().split())
mass = list()
for i in range(H):
mass.append(input())
values_col = defaultdict(int)
values_row = defaultdict(int)
ind_row = [[0 for i in range(W)] for j in range(H)]
ind_col = [[0 for i in range(W)] for j in range(H)]
ind = 0
for i, m_row in ... | replace | 11 | 13 | 11 | 13 | IndexError: list assignment index out of range | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03014/Python/s136781133.py", line 23, in <module>
ind_row[i][j] = ind
IndexError: list assignment index out of range
|
p03014 | Python | Time Limit Exceeded | import numpy as np
h, w = map(int, input().split())
grid = [[False for j in range(w)] for i in range(h)]
for i in range(h):
s = input()
for j in range(w):
if s[j] == ".":
grid[i][j] = 1
else:
grid[i][j] = 0
grid = np.array(grid)
L = np.zeros((h, w), dtype=int)
R = np.... | import numpy as np
h, w = map(int, input().split())
grid = [[False for j in range(w)] for i in range(h)]
for i in range(h):
s = input()
for j in range(w):
if s[j] == ".":
grid[i][j] = 1
else:
grid[i][j] = 0
grid = np.array(grid)
L = np.zeros((h, w), dtype=int)
R = np.... | delete | 46 | 52 | 46 | 46 | TLE | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
for (int i = 0; i < h; i++) {
cin >> s.at(i);
}
vector<vector<int>> cnt(h, vector<int>(w));
for (int i = 0; i < h; i++) {
vector<int> done(w);
for (int j = 0; j < w; j++) {
if (s.... | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
for (int i = 0; i < h; i++) {
cin >> s.at(i);
}
vector<vector<int>> cnt(h, vector<int>(w));
for (int i = 0; i < h; i++) {
vector<int> done(w);
for (int j = 0; j < w; j++) {
if (s.... | replace | 47 | 48 | 47 | 48 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 4) >= this->size() (which is 4)
|
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define FOR(i, start, end) for (int i = start; i <= end; i++)
const int INF = 1001001001;
using namespace std;
typedef long long ll;
int H, W;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
#define WMAX 200
#define HMAX WMAX
char... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define FOR(i, start, end) for (int i = start; i <= end; i++)
const int INF = 1001001001;
using namespace std;
typedef long long ll;
int H, W;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
#define WMAX 2001
#define HMAX WMAX
cha... | replace | 10 | 11 | 10 | 11 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int H, W;
cin >> H >> W;
vector<vector<char>> S(H, vector<char>(W));
vector<vector<pair<int, int>>> B(H, vector<pair<int, int>>(W));
for (int i = 0; i < H; i++) {
for (int j ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int H, W;
cin >> H >> W;
vector<vector<char>> S(H, vector<char>(W));
vector<vector<pair<int, int>>> B(H, vector<pair<int, int>>(W));
for (int i = 0; i < H; i++) {
for (int j ... | replace | 22 | 23 | 22 | 23 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int H, W, ans = 0, v[20][20] = {}, k = 0, n = 0;
char masu[21][21];
cin >> H >> W;
for (int i = 0; i < H; i++) {
k = 0;
n =... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int H, W, ans = 0, v[2001][2001] = {}, k = 0, n = 0;
char masu[2001][2001];
cin >> H >> W;
for (int i = 0; i < H; i++) {
k = 0;... | replace | 10 | 12 | 10 | 12 | 0 | |
p03014 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int n, m;
char a[2005][2005];
int ans = 0;
int main() {
scanf("%d%d", &n, &m);
int ma = n + m - 1;
for (int i = 0; i < n; i++)
scanf("%s", a[i]);
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++) {
int s = 1;
if (a[i][j] == '.') {
... | #include <bits/stdc++.h>
using namespace std;
int n, m;
char a[2005][2005];
int ans = 0;
int main() {
scanf("%d%d", &n, &m);
int ma = n + m - 1;
for (int i = 0; i < n; i++)
scanf("%s", a[i]);
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++) {
int s = 1;
if (a[i][j] == '.') {
... | insert | 38 | 38 | 38 | 40 | TLE | |
p03014 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
for (int i = 0; i < h; i++) {
cin >> s[i];
}
// 各行(列)に何個障害物があるかを累積和で記録する
vector<vector<int>> cumh(h, vector<int>(w, 0));
vector<vector<int>> ... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
for (int i = 0; i < h; i++) {
cin >> s[i];
}
// 各行(列)に何個障害物があるかを累積和で記録する
vector<vector<int>> cumh(h, vector<int>(w, 0));
vector<vector<int>> ... | replace | 42 | 43 | 42 | 43 | TLE | |
p03014 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
char S[H][W];
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> S[i][j];
}
}
int maxcnt = 0;
int temp;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (S[i][j] =... | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
char S[H][W];
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
cin >> S[i][j];
}
}
int maxcnt = 0;
int temp;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (S[i][j] =... | insert | 42 | 42 | 42 | 44 | TLE | |
p03014 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
// #define INF (int32)1e9
#define REP(i, n) for (int64 i = 0; i < (n); i++)
#define FOR(i, a, b) for (int64 i = (a); i < (b); i++)
#define all(x) x.begin(), x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = ui... | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
// #define INF (int32)1e9
#define REP(i, n) for (int64 i = 0; i < (n); i++)
#define FOR(i, a, b) for (int64 i = (a); i < (b); i++)
#define all(x) x.begin(), x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = ui... | insert | 200 | 200 | 200 | 202 | TLE | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define all(a) a.begin(), a.end()
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, a, b) for (ll i = a; i < b; i++)
const int max_n = 1e5;
const ll mod = 1e9 + 7;
typedef long double ld... | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define all(a) a.begin(), a.end()
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, a, b) for (ll i = a; i < b; i++)
const int max_n = 1e5;
const ll mod = 1e9 + 7;
typedef long double ld... | replace | 16 | 17 | 16 | 17 | -11 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(0);
#define FOR(i, s, n) for (int i = s; i < n; i++)
#define REP(n) FOR(i, 0, n)
#define ALL(n) (n).b... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(0);
#define FOR(i, s, n) for (int i = s; i < n; i++)
#define REP(n) FOR(i, 0, n)
#define ALL(n) (n).b... | replace | 20 | 21 | 20 | 21 | 0 | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
vector<vector<int>> ans_h(h, vector<int>(w, 0));
vector<vector<int>> ans_w(h, vecto... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
vector<vector<int>> ans_h(h, vector<int>(w, 0));
vector<vector<int>> ans_w(h, vecto... | replace | 36 | 37 | 36 | 37 | -11 | |
p03014 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vect... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vect... | replace | 37 | 38 | 37 | 38 | TLE | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
for (int i = 0; i < h; i++) {
cin >> s[i];
}
vector<vector<int>> cnt(h, vector<int>(w));
for (int i = 0; i < h; i++) {
... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
for (int i = 0; i < h; i++) {
cin >> s[i];
}
vector<vector<int>> cnt(h, vector<int>(w));
for (int i = 0; i < h; i++) {
... | replace | 27 | 28 | 27 | 28 | -11 | |
p03014 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int H, W;
char M[2005][2005];
bool vis[4][2005][2005];
int D[4][2005][2005];
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
inline bool val(int i, int j) { return 0 <= i && i < H && 0 <= j && j < W; }
int dfs(int k, int i, int j) {
if (vis[k][i][j])
return ... | #include <bits/stdc++.h>
using namespace std;
int H, W;
char M[2005][2005];
bool vis[4][2005][2005];
int D[4][2005][2005];
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
inline bool val(int i, int j) { return 0 <= i && i < H && 0 <= j && j < W; }
int dfs(int k, int i, int j) {
if (vis[k][i][j])
return ... | insert | 22 | 22 | 22 | 23 | TLE | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
using namespace std;
// using namespace boost::multiprecision;
typedef long long int ll;
typedef long double ld;
#define MOD 1000000007
#define ALL(obj) (obj).begin(), (obj).end()
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
... | #include <iostream>
// #include <boost/multiprecision/cpp_int.hpp>
using namespace std;
// using namespace boost::multiprecision;
typedef long long int ll;
typedef long double ld;
#define MOD 1000000007
#define ALL(obj) (obj).begin(), (obj).end()
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = ... | replace | 0 | 1 | 0 | 1 | -11 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
new_data_set;
#define fast ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
new_data_set;
#define fast ... | replace | 67 | 68 | 67 | 68 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> VI;
typedef long long ll;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> H(N + 1, vector<int>(M + 1)),
V(M + 1, vector<int>(N + 1));
vector<vector<pair<char, pair<int, int>>>> X(
N + 1, vector<pair<char, pair<int, int>>>(M... | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> VI;
typedef long long ll;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> H(N + 1, vector<int>(20000)),
V(M + 1, vector<int>(20000));
vector<vector<pair<char, pair<int, int>>>> X(
N + 1, vector<pair<char, pair<int, int>>>(M... | replace | 8 | 10 | 8 | 10 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll H, W;
vector<string> S;
void solve() {
vector<vector<ll>> L(H, vector<ll>(W));
vector<vector<ll>> R(H, vector<ll>(W));
vector<vector<ll>> U(H, vector<ll>(W));
vector<vector<ll>> D(H, vector<ll>(W));
for (int i = 0; i < H; i++) {
L[i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll H, W;
vector<string> S;
void solve() {
vector<vector<ll>> L(H, vector<ll>(W));
vector<vector<ll>> R(H, vector<ll>(W));
vector<vector<ll>> U(H, vector<ll>(W));
vector<vector<ll>> D(H, vector<ll>(W));
for (int i = 0; i < H; i++) {
L[i... | replace | 18 | 19 | 18 | 19 | 0 | |
p03014 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using st = string;
using ch = char;
typedef pair<ll, ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#def... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using st = string;
using ch = char;
typedef pair<ll, ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#def... | replace | 33 | 34 | 33 | 34 | -6 | free(): invalid pointer
|
p03014 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
const int MOD = 1e9 + 7;
void solve(void) {
int h, w;
cin >> h >> w;
vector<string> g(h);
for (int i = 0; i < h; i++) {
cin >> g[i];
}
vector<vector<int>> hs(w, vector<int>(h)), ws(h, vector<int>(w));
for (int i = 0; i < h; i++) {
for (int j = 0; j ... | #include "bits/stdc++.h"
using namespace std;
const int MOD = 1e9 + 7;
void solve(void) {
int h, w;
cin >> h >> w;
vector<string> g(h);
for (int i = 0; i < h; i++) {
cin >> g[i];
}
vector<vector<int>> hs(2020, vector<int>(2020)), ws(2020, vector<int>(2020));
for (int i = 0; i < h; i++) {
for (i... | replace | 13 | 14 | 13 | 14 | 0 | |
p03014 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
bool field[h + 1][w + 1];
for (int i = 1; i <= h; i++) {
char c;
for (int j = 1; j <= w; j++) {
cin >> c;
if (c == '#') {
field[i][j] = false;
} else {
field[i][j] = true;
}
}
}
... | #include <iostream>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
bool field[h + 1][w + 1];
for (int i = 1; i <= h; i++) {
char c;
for (int j = 1; j <= w; j++) {
cin >> c;
if (c == '#') {
field[i][j] = false;
} else {
field[i][j] = true;
}
}
}
... | insert | 58 | 58 | 58 | 61 | TLE | |
p03014 | C++ | Runtime Error | #include <algorithm>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
bool m[2010][2010];
int *l1[2010][2010];
int *l2[2010][2010];
int ll1[2000000];
int ll2[2000000];
int main() {
... | #include <algorithm>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
bool m[2010][2010];
int *l1[2010][2010];
int *l2[2010][2010];
int ll1[4000000];
int ll2[4000000];
int main() {
... | replace | 15 | 17 | 15 | 17 | 0 | |
p03016 | C++ | Runtime Error | // >>> TEMPLATES
#include <bits/stdc++.h>
using namespace std;
#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 repR(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define rep1R(i, n) for (int i = int(n); i >= 1; i--)
#define loop(i, a, B) for (int i = a; i B;... | // >>> TEMPLATES
#include <bits/stdc++.h>
using namespace std;
#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 repR(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define rep1R(i, n) for (int i = int(n); i >= 1; i--)
#define loop(i, a, B) for (int i = a; i B;... | replace | 364 | 365 | 364 | 365 | 0 | |
p03016 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#include "../include/debug.hpp"
#else
#define debug(...) 42
#define rdfile(...) 42
#endif
typedef vector<long long> vec;
typedef vector<vector<long long>> mat;
const long long INF = LLONG_MAX;
long long L, A, B, M;
long long pow10(long long n, long long M) ... | #include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#include "../include/debug.hpp"
#else
#define debug(...) 42
#define rdfile(...) 42
#endif
typedef vector<long long> vec;
typedef vector<vector<long long>> mat;
const long long INF = LLONG_MAX;
long long L, A, B, M;
long long pow10(long long n, long long M) ... | replace | 70 | 71 | 70 | 76 | 0 | |
p03016 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define LL long long
#define PB push_back
#define MP make_pair
LL L, A, B, M;
// 行列
// http://www.yamamo10.jp/yamamoto/comp/cpp/ex_class/matrix.php
class Matrix {
int row; // 行
int column; // 列
long long **p_top; // 配列の最初
public:
Matrix(int i = 1... | #include "bits/stdc++.h"
using namespace std;
#define LL long long
#define PB push_back
#define MP make_pair
LL L, A, B, M;
// 行列
// http://www.yamamo10.jp/yamamoto/comp/cpp/ex_class/matrix.php
class Matrix {
int row; // 行
int column; // 列
long long **p_top; // 配列の最初
public:
Matrix(int i = 1... | replace | 154 | 155 | 154 | 155 | 0 | |
p03016 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include ... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include ... | replace | 58 | 64 | 58 | 65 | TLE | |
p03016 | 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;
typedef vector<ll> vec;
typedef vector<vec> mat;
ll L, A, B, MOD;
mat mul(mat &a, mat &b) {
mat c(a.size(), vec(b[0].size()));
rep(i, a.size()) rep(j, b[0].size())
r... | #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;
typedef vector<ll> vec;
typedef vector<vec> mat;
ll L, A, B, MOD;
mat mul(mat &a, mat &b) {
mat c(a.size(), vec(b[0].size()));
rep(i, a.size()) rep(j, b[0].size())
r... | replace | 59 | 60 | 59 | 60 | TLE | |
p03016 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> Pii;
typedef vector<ll> Vi;
typedef vector<Vi> VVi;
const double EPS = (1e-7);
const ll INF = (1e13);
const double PI = (acos(-1));
const ll MOD = ll(1e9) + 7;
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPR(i, n... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> Pii;
typedef vector<ll> Vi;
typedef vector<Vi> VVi;
const double EPS = (1e-7);
const ll INF = (1e13);
const double PI = (acos(-1));
const ll MOD = ll(1e9) + 7;
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPR(i, n... | replace | 100 | 103 | 100 | 104 | TLE | |
p03016 | C++ | Time Limit Exceeded | //
// Created by yamunaku on 2019/11/05.
//
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repl(i, l, r) for (int i = (l); i < (r); i++)
#define per(i, n) for (int i = ((n)-1); i >= 0; i--)
#define perl(i, l, r) for (int i = ((r)-1); i >= (l); i--)
#define all(x... | //
// Created by yamunaku on 2019/11/05.
//
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repl(i, l, r) for (int i = (l); i < (r); i++)
#define per(i, n) for (int i = ((n)-1); i >= 0; i--)
#define perl(i, l, r) for (int i = ((r)-1); i >= (l); i--)
#define all(x... | replace | 83 | 84 | 83 | 84 | TLE | |
p03016 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (int i = 0, _n = (int)(n); i < _n; ++i)
#define ALL(v) (v).begin(), (v).end()
#define CLR(t, v) memset(t, (v), sizeof(t))
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &a) {
return os << "(" ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (int i = 0, _n = (int)(n); i < _n; ++i)
#define ALL(v) (v).begin(), (v).end()
#define CLR(t, v) memset(t, (v), sizeof(t))
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &a) {
return os << "(" ... | replace | 161 | 165 | 161 | 162 | TLE | |
p03016 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
int Mod;
struct Matrix {
int n, m;
ll a[10][10];
Matrix(int _n = 0, int _m = 0, int x = 0) {
memset(a, 0, sizeof a);
n = _n, m = _m;
for (int i = 1; i <= n; ++i)
a[i][i] = x;
}
Matrix operator*(const Matrix &b) ... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
int Mod;
struct Matrix {
int n, m;
ll a[10][10];
Matrix(int _n = 0, int _m = 0, int x = 0) {
memset(a, 0, sizeof a);
n = _n, m = _m;
for (int i = 1; i <= n; ++i)
a[i][i] = x;
}
Matrix operator*(const Matrix &b) ... | delete | 52 | 54 | 52 | 52 | -8 | |
p03016 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
... | replace | 116 | 117 | 116 | 117 | TLE | |
p03016 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <set>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define mod 1000000007
#define mad(a, b) a = (a + b) % mod
#define Nmax 55
ll mo;
ll po(ll ... | #include <algorithm>
#include <iostream>
#include <queue>
#include <set>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define mod 1000000007
#define mad(a, b) a = (a + b) % mod
#define Nmax 55
ll mo;
ll po(ll ... | replace | 100 | 101 | 100 | 101 | 0 | |
p03016 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define db double
#define pii pair<int, int>
#define pli pair<ll, int>
#define pil pair<int, ll>
#define pll pair<ll, ll>
#define mat vector<vector<ll>>
const int inf = 1 << 30;
const ll linf = 1e18;
const db EPS = 1e-7;
template <class T> void chmin(T ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define db double
#define pii pair<int, int>
#define pli pair<ll, int>
#define pil pair<int, ll>
#define pll pair<ll, ll>
#define mat vector<vector<ll>>
const int inf = 1 << 30;
const ll linf = 1e18;
const db EPS = 1e-7;
template <class T> void chmin(T ... | replace | 77 | 78 | 77 | 78 | TLE | |
p03017 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
int main() {
ll n, a, b, c, d;
cin >> n >> a >> b >> c >> d;
a--;
b--;
c--;
d--;
string s;
cin >> s;
bool ans = true;
s[n] = '#';
for (ll i = b; i <= d; i++) {
if (s[i] == '#' && s[i + 1] == '#') {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
int main() {
ll n, a, b, c, d;
cin >> n >> a >> b >> c >> d;
a--;
b--;
c--;
d--;
string s;
cin >> s;
bool ans = true;
s[n] = '#';
for (ll i = b; i <= d; i++) {
if (s[i] == '#' && s[i + 1] == '#') {
... | replace | 21 | 26 | 21 | 26 | TLE | |
p03017 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <chrono>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
const int MAXN = 100000;
char s[1 + MAXN];
bool dpa[1 + MAXN],... | #include <algorithm>
#include <cassert>
#include <chrono>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
const int MAXN = 200000;
char s[1 + MAXN];
bool dpa[1 + MAXN],... | replace | 16 | 17 | 16 | 17 | 0 | |
p03017 | C++ | Runtime Error | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define puts(i) cout << i << endl
#define INF INT_MAX
#define INFL LLONG_MAX
typedef long long ll;
using namespace std;
int main() {
ll n, a, b, c, d;
cin >> n >> a >> b >> c >> d;... | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define puts(i) cout << i << endl
#define INF INT_MAX
#define INFL LLONG_MAX
typedef long long ll;
using namespace std;
int main() {
ll n, a, b, c, d;
cin >> n >> a >> b >> c >> d;... | replace | 40 | 42 | 40 | 42 | 0 | |
p03017 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, x, y) for (int i = x; i < y; i++)
#define range(a) a.begin(), a.end()
int main() {
int N, A, B, C, D;
cin >> N >> A >> B >> C >> D;
string S;
cin >> S;
if (C < D) {
bool flag = true;
rep(i, A - 1, C - 2) {
if (S.at(i) == '#' && S.at(i ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, x, y) for (int i = x; i < y; i++)
#define range(a) a.begin(), a.end()
int main() {
int N, A, B, C, D;
cin >> N >> A >> B >> C >> D;
string S;
cin >> S;
if (C < D) {
bool flag = true;
rep(i, A - 1, C - 2) {
if (S.at(i) == '#' && S.at(i ... | replace | 48 | 49 | 48 | 50 | 0 | |
p03017 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
using PII = pair<int, int>;
#define FI(i, a, b) for (int i = (a); i <= (b); ++i)
#define FD(i, b, a) for (int i = (b); i >= (a); --i)
#define DEBUG(x) cerr << #x << ": " << (x) << endl;
int main() {
int n, a, b, c, d;
cin >> n >> a >> b >> c >> d;... | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
using PII = pair<int, int>;
#define FI(i, a, b) for (int i = (a); i <= (b); ++i)
#define FD(i, b, a) for (int i = (b); i >= (a); --i)
#define DEBUG(x) cerr << #x << ": " << (x) << endl;
int main() {
int n, a, b, c, d;
cin >> n >> a >> b >> c >> d;... | replace | 12 | 13 | 12 | 13 | 0 | |
p03017 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int Max = 1000000;
int N;
int A, B, C, D;
string S;
bool possi(int a, int b) {
bool res = true;
for (int i = a + 1; i < b; i++) {
if (S[i] == S[i + 1... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int Max = 1000000;
int N;
int A, B, C, D;
string S;
bool possi(int a, int b) {
bool res = true;
for (int i = a + 1; i < b; i++) {
if (S[i] == S[i + 1... | delete | 24 | 25 | 24 | 24 | 0 | |
p03017 | Python | Runtime Error | # https://atcoder.jp/contests/agc034/tasks/agc034_a
import sys
# sys.setrecursionlimit(100000)
def input():
return sys.stdin.readline().strip()
def input_int():
return int(input())
def input_int_list():
return [int(i) for i in input().split()]
def main():
n, a, b, c, d = input_int_list()
S... | # https://atcoder.jp/contests/agc034/tasks/agc034_a
import sys
# sys.setrecursionlimit(100000)
def input():
return sys.stdin.readline().strip()
def input_int():
return int(input())
def input_int_list():
return [int(i) for i in input().split()]
def main():
n, a, b, c, d = input_int_list()
S... | replace | 32 | 33 | 32 | 33 | 0 | |
p03017 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define FOR(i, a, b) for (int i = (a); i... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define FOR(i, a, b) for (int i = (a); i... | replace | 65 | 66 | 65 | 66 | TLE | |
p03017 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define sz(x) ((int)x.size())
#define fast_io \
ios_base::sync_with_stdio(0); \
cin.tie(0)
typedef long long ll;
string s;
bool can_reach(int p, int q) {
wh... | #include <bits/stdc++.h>
using namespace std;
#define sz(x) ((int)x.size())
#define fast_io \
ios_base::sync_with_stdio(0); \
cin.tie(0)
typedef long long ll;
string s;
bool can_reach(int p, int q) {
wh... | insert | 16 | 16 | 16 | 18 | TLE | |
p03017 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
bool check(int start, int end, string S) {
for (int i = start; i <= end; i++) {
if (i + 1 == end || i == end - 1)
break;
if (S.at(i + 1) == '#') {
if (S.at(i + 2) == '#') {
cout << "No" << endl;
return 0;
} else {
i++;
... | #include <bits/stdc++.h>
using namespace std;
bool check(int start, int end, string S) {
for (int i = start; i <= end; i++) {
if (i + 1 == end || i + 2 == end)
break;
if (S.at(i + 1) == '#') {
if (S.at(i + 2) == '#') {
cout << "No" << endl;
return 0;
} else {
i++;
... | replace | 5 | 6 | 5 | 6 | 0 | |
p03017 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using vint = vector<int>;
using vvint = vector<vint>;
using vvvint = vector<vvint>;
using vdouble = vector<double>;
using vvdouble = vector<vdouble>;
using vvvdouble = vector<vvdouble>;
using vll = v... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using vint = vector<int>;
using vvint = vector<vint>;
using vvvint = vector<vvint>;
using vdouble = vector<double>;
using vvdouble = vector<vdouble>;
using vvvdouble = vector<vvdouble>;
using vll = v... | replace | 86 | 88 | 86 | 87 | 0 | |
p03017 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n, a, b, c, d;
string str;
bool check(ll l, ll r) {
ll i = l;
while (i < r) {
if ((i + 1) < n && str[i + 1] == '.')
i++;
else if ((i + 2) < n && str[i + 2] == '.')
i += 2;
}
if (i == r)
return true;
return false;
}... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n, a, b, c, d;
string str;
bool check(ll l, ll r) {
ll i = l;
while (i < r) {
if ((i + 1) < n && str[i + 1] == '.')
i++;
else if ((i + 2) < n && str[i + 2] == '.')
i += 2;
else
break;
}
if (i == r)
return t... | insert | 14 | 14 | 14 | 16 | TLE | |
p03017 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define fr(i, a, b) for (ll i = a; i < b; i++)
#define pb(v, a) v.push_back(a)
#define Sort(v) sort(v.begin(), v.end())
#define For(m) for (auto it = m.begin(); it != m.end(); it++)
#define mp(p1, p2) make_pair(p1, p2)
#define mod 1000000007
#define PI 3.141592653589793... | #include <bits/stdc++.h>
#define ll long long int
#define fr(i, a, b) for (ll i = a; i < b; i++)
#define pb(v, a) v.push_back(a)
#define Sort(v) sort(v.begin(), v.end())
#define For(m) for (auto it = m.begin(); it != m.end(); it++)
#define mp(p1, p2) make_pair(p1, p2)
#define mod 1000000007
#define PI 3.141592653589793... | replace | 17 | 21 | 17 | 21 | -11 | |
p03017 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
bool judge(int a, int b, string s) {
for (int i = a - 1; i < b - 1; i++) {
if (s[i] == '#' && s[i + 1] == '#') {
return false;
}
}
return true;
}
bool check(int a, int b, string s) {
for (int i... | #include <iostream>
#include <string>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
bool judge(int a, int b, string s) {
for (int i = a - 1; i < b - 1; i++) {
if (s[i] == '#' && s[i + 1] == '#') {
return false;
}
}
return true;
}
bool check(int a, int b, string s) {
for (int i... | replace | 22 | 23 | 22 | 23 | 0 | |
p03017 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define pb push_back
#define mk make_pair
#define eps 1e-8
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
using nam... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define pb push_back
#define mk make_pair
#define eps 1e-8
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
using nam... | replace | 42 | 43 | 42 | 43 | -11 | |
p03017 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 100006;
int T, a, b, c, d, n;
char s[N];
bool fl;
int main() {
scanf("%d%d%d%d%d%s", &n, &a, &b, &c, &d, s + 1);
s[n + 1] = s[n + 2] = s[n + 3] = '#';
s[b] = '#', fl = 1;
for (; (a < c || b < d) && fl;) {
while (a < c && a < b - 1) {
if (a + ... | #include <bits/stdc++.h>
using namespace std;
const int N = 200006;
int T, a, b, c, d, n;
char s[N];
bool fl;
int main() {
scanf("%d%d%d%d%d%s", &n, &a, &b, &c, &d, s + 1);
s[n + 1] = s[n + 2] = s[n + 3] = '#';
s[b] = '#', fl = 1;
for (; (a < c || b < d) && fl;) {
while (a < c && a < b - 1) {
if (a + ... | replace | 2 | 3 | 2 | 3 | 0 | |
p03018 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int ans = 0;
for (int i = 0; i < s.length() - 1; i++) {
if (s[i] != 'A')
continue;
int p = i + 1;
while (p < s.length() - 1) {
assert(p <= s.length() - 2);
if (s[p] == 'B' && s[p + 1] == 'C') {
a... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
long long ans = 0;
vector<int> count(s.length());
int t = 0;
for (int i = s.length() - 1; i >= 0; i--) {
if (i == s.length() - 1)
count[i] = 0;
else if (s[i] == 'B' && s[i + 1] == 'C')
t++;
else if (s[i] =... | replace | 5 | 19 | 5 | 21 | TLE | |
p03018 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5, mod = 1e9 + 7;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
string s;
cin >> s;
int ans = 0, ls = s.size(), p = s.find("BC", 0);
while (p != string::npos) {
s.erase(p, 2);
int t = p - 1;
while (t ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5, mod = 1e9 + 7;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
string s;
cin >> s;
int ls = s.size(), lm = 0;
ll ans = 0;
for (int i = 0; i < ls - 1; ++i) {
if (s[i] == 'B' && s[i + 1] == 'C') {
ans ... | replace | 10 | 18 | 10 | 18 | TLE | |
p03018 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfenv>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#inc... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfenv>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#inc... | replace | 93 | 107 | 93 | 101 | 0 | |
p03018 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll h[200010], n, tt;
char s[200010];
bool bo[200010];
inline int rd() {
int x = 0;
char ch = getchar();
for (; ch < '0' || ch > '9'; ch = getchar())
;
for (; ch >= '0' && ch <= '9'; ch = getchar())
x = x * 10 + ch - '0';
return x;
}
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll h[200010], n, tt;
char s[200010];
bool bo[200010];
inline int rd() {
int x = 0;
char ch = getchar();
for (; ch < '0' || ch > '9'; ch = getchar())
;
for (; ch >= '0' && ch <= '9'; ch = getchar())
x = x * 10 + ch - '0';
return x;
}
... | replace | 36 | 37 | 36 | 37 | 0 | |
p03018 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
int main() {
string s;
cin >> s;
int cnt = 0, flag = 0, sz = s.size();
queue<int> que;
for (int i = 0; i < sz - 2; i++) {
if (s.substr(i, 3) == "ABC")
que.push(i);
}
/*while(flag==0){
flag=1;
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
int main() {
string s;
cin >> s;
ll cnt = 0;
int sz = s.size();
int numa1 = 0; // iまでに連なるaの数
int numa2 = 0; // iがbのとき前に連なるaの数
for (int i = 0; i < sz; i++) {
// 最後がbのときcがきたらnuma2を足す
if (s[i] == 'A') {
... | replace | 8 | 38 | 8 | 26 | TLE | |
p03018 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
long long a[100];
int main() {
... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
long long a[100];
int main() {
... | replace | 20 | 46 | 20 | 31 | TLE | |
p03018 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(x) (x).begin(), (x).end()
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
int i = 0, ans = 0;
while (i < (int)s.size() - 2) {
if (s[i] == ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(x) (x).begin(), (x).end()
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
int A = 0, B = 0;
ll ans = 0;
REP(i, s.size()) {
if (s[i] == '... | replace | 12 | 23 | 12 | 36 | TLE | |
p03018 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#pragma region
using namespace std;
#define FOR(i, r, n) fo... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#pragma region
using namespace std;
#define FOR(i, r, n) fo... | replace | 54 | 62 | 54 | 66 | TLE | |
p03018 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < s.size() - 1; i++) {
if (s[i] == 'B' && s[i + 1] == 'C') {
s.replace(i, 2, 1, 'S');
}
}
int count = 0;
for (int i = 0; i < ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < s.size() - 1; i++) {
if (s[i] == 'B' && s[i + 1] == 'C') {
s.replace(i, 2, 1, 'S');
}
}
long int count = 0;
long int a_coun... | replace | 17 | 26 | 17 | 26 | TLE | |
p03018 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long arr[1000000];
int main() {
string s;
long long n, i, j, k, m, x, y, z;
cin >> s;
x = 0;
y = 0;
i = 0;
while (i < s.length() - 1) {
if (s[i] == 'A') {
x++;
i++;
} else if (s[i] == 'B' && s[i + 1] == 'C') {
if (x > 0) {
... | #include <bits/stdc++.h>
using namespace std;
long long arr[1000000];
int main() {
string s;
long long n, i, j, k, m, x, y, z;
cin >> s;
x = 0;
y = 0;
i = 0;
while (i < s.length() - 1) {
if (s[i] == 'A') {
x++;
i++;
} else if (s[i] == 'B' && s[i + 1] == 'C') {
if (x > 0) {
... | delete | 11 | 29 | 11 | 11 | -11 | |
p03018 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, s, n) for (int i = (s); i <= (n); i++)
#define repr(i, n) for (int i = n - 1; i >= 0; i--)
#define REPR(i, s, n) for (int i = (s); i >= (n); i--)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin()... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, s, n) for (int i = (s); i <= (n); i++)
#define repr(i, n) for (int i = n - 1; i >= 0; i--)
#define REPR(i, s, n) for (int i = (s); i >= (n); i--)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin()... | replace | 122 | 126 | 122 | 131 | TLE | |
p03018 | C++ | Time Limit Exceeded | /*
`-:://:::-
`//:-------:/:`
.+:--.......--:+`
`+:--..`````..--//`
.o:--..`` ``..--:o`
... | /*
`-:://:::-
`//:-------:/:`
.+:--.......--:+`
`+:--..`````..--//`
.o:--..`` ``..--:o`
... | replace | 353 | 355 | 353 | 367 | TLE | |
p03018 | C++ | Runtime Error | #include <bits/stdc++.h>
#define reps(i, a, b) for (long long int i = a; i < b; i++)
#define rep(i, a) for (long long int i = 0; i < a; i++)
typedef long long int ll;
using namespace std;
ll MOD = 1000000007;
const int MAX = 510000;
struct aaa {
aaa() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed... | #include <bits/stdc++.h>
#define reps(i, a, b) for (long long int i = a; i < b; i++)
#define rep(i, a) for (long long int i = 0; i < a; i++)
typedef long long int ll;
using namespace std;
ll MOD = 1000000007;
const int MAX = 510000;
struct aaa {
aaa() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed... | replace | 20 | 21 | 20 | 21 | 0 | |
p03018 | C++ | Time Limit Exceeded | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/rope>
#ifndef ONLINE_JUDGE
// #define DEBUG
#endif
#ifdef DEBUG
#define IFD(...) __VA_ARGS__
#define IFN(...)
#define L cout << __LINE__ << "\n";
#define PRINT(...) __VA_ARGS__ cout << __LINE__ << " : " << #__VA... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/rope>
#ifndef ONLINE_JUDGE
// #define DEBUG
#endif
#ifdef DEBUG
#define IFD(...) __VA_ARGS__
#define IFN(...)
#define L cout << __LINE__ << "\n";
#define PRINT(...) __VA_ARGS__ cout << __LINE__ << " : " << #__VA... | replace | 160 | 175 | 160 | 168 | TLE | |
p03018 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define S second
#define F first
typedef long long ll;
typedef long double ld;
using namespace std;
const int INF = 1e9;
const int maxn = 1e5 + 10;
const int mod = 1e9 + 7;
int n;
int A[maxn];
string s;
vector<int> v;
int dp[maxn];
signed main() {
cin >> s;
n = s... | #include <bits/stdc++.h>
#define int long long
#define S second
#define F first
typedef long long ll;
typedef long double ld;
using namespace std;
const int INF = 1e9;
const int maxn = 2e5 + 10;
const int mod = 1e9 + 7;
int n;
int A[maxn];
string s;
vector<int> v;
int dp[maxn];
signed main() {
cin >> s;
n = s... | replace | 12 | 13 | 12 | 13 | 0 | |
p03018 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin()... | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin()... | replace | 39 | 59 | 39 | 60 | TLE | |
p03018 | C++ | Runtime Error | #pragma GCC optimize("O3")
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define F0R(i, a) for (int i = 0; i < (a); ++i)
#define pb push_back
#define sz size
#define f first
#define s second
int main() {
freopen(... | #pragma GCC optimize("O3")
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define F0R(i, a) for (int i = 0; i < (a); ++i)
#define pb push_back
#define sz size
#define f first
#define s second
int main() {
// freop... | replace | 16 | 18 | 16 | 18 | 0 | |
p03018 | C++ | Time Limit Exceeded | #define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/stack:16777216")
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <memory.h>
#include <queue>
#include ... | #define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/stack:16777216")
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <memory.h>
#include <queue>
#include ... | replace | 63 | 73 | 63 | 72 | TLE | |
p03018 | 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() {
string s;
cin >> s;
int n = s.size();
int ans = 0;
bool ck = true;
while (ck) {
ck = false;
for (int i = 0; i < n - 2; i++) {
if (s[i] == ... | #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() {
string s;
cin >> s;
int n = s.size();
ll ans = 0;
ll cnt = 0;
for (int i = 0; i < n - 2; i++) {
if (s[i] == 'A' && s[i + 1] == 'B' && s[i + 2] == 'C... | replace | 10 | 22 | 10 | 21 | TLE | |
p03018 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef double db;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
#define pb push_back
#define mp make_pair
#define MAX 1000000
#define mod 100... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef double db;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
#define pb push_back
#define mp make_pair
#define MAX 1000000
#define mod 100... | insert | 51 | 51 | 51 | 52 | TLE | |
p03018 | C++ | Time Limit Exceeded | /* بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ */
// codeforces1148C
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define FASTIO ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define mp make_pair
#define pb push_back
void parseArray(ll *A, ll... | /* بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ */
// codeforces1148C
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define FASTIO ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define mp make_pair
#define pb push_back
void parseArray(ll *A, ll... | replace | 37 | 54 | 37 | 43 | TLE | |
p03018 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rt "\n"
#define sp " "
#define test(n) cout << "test" << n << endl;
#define fixsp(n) fixed << setprecision(n)
#define defsp(n) defaultfloat << setprecision(n)
#define kyopro \
ios::sync_with_stdio(false); ... | #include <bits/stdc++.h>
#define rt "\n"
#define sp " "
#define test(n) cout << "test" << n << endl;
#define fixsp(n) fixed << setprecision(n)
#define defsp(n) defaultfloat << setprecision(n)
#define kyopro \
ios::sync_with_stdio(false); ... | replace | 70 | 79 | 70 | 83 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.