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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02579 | 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 rep2(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define rev(i, n) for (int(i) = (n)-1; (i) >= 0; (i)--)
#define rev2(i, a, b) for (int(i) = (a)-1; (i) >= (b); (i)--)
#define rng(a) a.begin(), a.en... | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rep2(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define rev(i, n) for (int(i) = (n)-1; (i) >= 0; (i)--)
#define rev2(i, a, b) for (int(i) = (a)-1; (i) >= (b); (i)--)
#define rng(a) a.begin(), a.en... | insert | 77 | 77 | 77 | 78 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// DEBUG BEGIN
#ifdef LOCAL
template <typename L, typename R>
ostream &operator<<(ostream &out, const pair<L, R> &p) {
return out << "(" << p.first << ", " << p.second << ")";
}
template <typename Tuple, size_t N> struct TuplePrinter {
static ostream &print(ostream &ou... | #include <bits/stdc++.h>
using namespace std;
// DEBUG BEGIN
#ifdef LOCAL
template <typename L, typename R>
ostream &operator<<(ostream &out, const pair<L, R> &p) {
return out << "(" << p.first << ", " << p.second << ")";
}
template <typename Tuple, size_t N> struct TuplePrinter {
static ostream &print(ostream &ou... | replace | 93 | 94 | 93 | 94 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
#define int ll
#define FOR(i, a, b) for (int i = a; i < (b); i++)
#define F0R(i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
#define int ll
#define FOR(i, a, b) for (int i = a; i < (b); i++)
#define F0R(i... | replace | 107 | 111 | 107 | 108 | TLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define el '\n'
#define pb push_back
#define sp ' '
#define all(x) (x).begin(), (x).end()
#define mset(x, y) memset(x, y, sizeof(x))
#define ff first
#define ss second
// clang-format off
bool chmin(int& a, int b){ return b < a ? a = b, true : false; }
bool chmax(int& a, ... | #include <bits/stdc++.h>
using namespace std;
#define el '\n'
#define pb push_back
#define sp ' '
#define all(x) (x).begin(), (x).end()
#define mset(x, y) memset(x, y, sizeof(x))
#define ff first
#define ss second
// clang-format off
bool chmin(int& a, int b){ return b < a ? a = b, true : false; }
bool chmax(int& a, ... | replace | 106 | 108 | 106 | 108 | 0 | |
p02579 | Python | Time Limit Exceeded | from collections import deque
def main():
def f(hi, wi):
return hi * w + wi
h, w = map(int, input().split())
sh, sw = map(int, input().split())
gh, gw = map(int, input().split())
s = [input() for _ in range(h)]
INF = 10**9
sh -= 1
sw -= 1
gh -= 1
gw -= 1
dq = de... | from collections import deque
def main():
def f(hi, wi):
return hi * w + wi
h, w = map(int, input().split())
sh, sw = map(int, input().split())
gh, gw = map(int, input().split())
s = [input() for _ in range(h)]
INF = 10**9
sh -= 1
sw -= 1
gh -= 1
gw -= 1
dq = de... | delete | 29 | 31 | 29 | 29 | TLE | |
p02579 | C++ | Time Limit Exceeded | // Ace
#include <bits/stdc++.h>
using namespace std;
using in = long long;
using str = string;
using pi = pair<in, in>;
using vi = vector<in>;
#define F first
#define S second
#define pb push_back
#define rep(i, k, n) for (in i = k; i < n; ++i)
#define repr(i, k, n) for (in i = k; i >= n; --i)
#define sz(x) (in) x.size... | // Ace
#include <bits/stdc++.h>
using namespace std;
using in = long long;
using str = string;
using pi = pair<in, in>;
using vi = vector<in>;
#define F first
#define S second
#define pb push_back
#define rep(i, k, n) for (in i = k; i < n; ++i)
#define repr(i, k, n) for (in i = k; i >= n; --i)
#define sz(x) (in) x.size... | replace | 71 | 73 | 71 | 75 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <chrono>
// #pragma GCC optimize("Ofast")
using namespace std;
#define reps(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) reps(i, 0, n)
#define Rreps(i, n, e) for (int i = n - 1; i >= e; --i)
#define Rrep(i, n) Rreps(i, n, 0)
#define ALL(a) a.begin(), a.end()
#define fi first
... | #include <bits/stdc++.h>
#include <chrono>
// #pragma GCC optimize("Ofast")
using namespace std;
#define reps(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) reps(i, 0, n)
#define Rreps(i, n, e) for (int i = n - 1; i >= e; --i)
#define Rrep(i, n) Rreps(i, n, 0)
#define ALL(a) a.begin(), a.end()
#define fi first
... | replace | 68 | 69 | 68 | 69 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define MOD 1000000007
using namespace std;
using ll = long long;
int mp[1005][1005] = {};
int main() {
int h, w;
cin >> h >> w;
int sx, sy, gx, gy;
cin >> sy >> sx >> gy >> gx;
rep(i, 1002) rep(j, 1002) {
if (i % (h + 1) == 0 ... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define MOD 1000000007
using namespace std;
using ll = long long;
int mp[1005][1005] = {};
int main() {
int h, w;
cin >> h >> w;
int sx, sy, gx, gy;
cin >> sy >> sx >> gy >> gx;
rep(i, 1002) rep(j, 1002) {
if (i % (h + 1) == 0 ... | replace | 29 | 51 | 29 | 47 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
int main() {
int h, w;
cin >> h >> w;
int si, sj;
cin >> si >> sj;
int ti, tj;
cin >> ti >> tj;
--... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
int main() {
int h, w;
cin >> h >> w;
int si, sj;
cin >> si >> sj;
int ti, tj;
cin >> ti >> tj;
--... | replace | 53 | 54 | 53 | 54 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n, m) for (int i = (n); i < (m); i++)
#define rrep(i, n, m) for (int i = (n)-1; i >= (m); i--)
#define pvec(vec) \
{ \
for (auto v : vec) ... | #include <bits/stdc++.h>
#define rep(i, n, m) for (int i = (n); i < (m); i++)
#define rrep(i, n, m) for (int i = (n)-1; i >= (m); i--)
#define pvec(vec) \
{ \
for (auto v : vec) ... | replace | 57 | 58 | 57 | 58 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
long long MOD = 1000000007LL;
const double PI = 3.14159265358979323846;
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -21474... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
long long MOD = 1000000007LL;
const double PI = 3.14159265358979323846;
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -21474... | replace | 40 | 41 | 40 | 41 | TLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fo(i, a, b) for (int i = a; i <= b; i++)
#define fod(i, a, b) for (int i = a; i >= b; i--)
#define me0(a) memset(a, 0, sizeof(a))
#define me1(a) memset(a, -1, sizeof(a))
#define op freopen("in.txt", "r", stdin)
#define op1 freopen("C:\\acm\\Cproj\\in.txt", "r", stdin);
#define pr freope... | #include <bits/stdc++.h>
#define fo(i, a, b) for (int i = a; i <= b; i++)
#define fod(i, a, b) for (int i = a; i >= b; i--)
#define me0(a) memset(a, 0, sizeof(a))
#define me1(a) memset(a, -1, sizeof(a))
#define op freopen("in.txt", "r", stdin)
#define op1 freopen("C:\\acm\\Cproj\\in.txt", "r", stdin);
#define pr freope... | replace | 43 | 44 | 43 | 44 | 0 | |
p02579 | C++ | Time Limit Exceeded | //
// main.cpp
// ervb
//
// Created by Kanak Gautam on 21/04/20.
// Copyright © 2020 Kanak Gautam. All rights reserved.
//
#include <algorithm>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#includ... | //
// main.cpp
// ervb
//
// Created by Kanak Gautam on 21/04/20.
// Copyright © 2020 Kanak Gautam. All rights reserved.
//
#include <algorithm>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#includ... | insert | 122 | 122 | 122 | 123 | TLE | |
p02579 | C++ | Time Limit Exceeded | #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 (int i = (a); i < (b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define ALL(x) x.begin(), x.end()
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = m... | #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 (int i = (a); i < (b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define ALL(x) x.begin(), x.end()
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = m... | replace | 82 | 83 | 82 | 106 | TLE | |
p02579 | Python | Runtime Error | from collections import deque
def solve(H, W, Ch, Cw, Dh, Dw, maze):
# 後の条件分岐を簡略化するためワープしても迷路外に出ないように壁で囲む
walled_maze = ["##{}##".format(row) for row in maze]
walled_maze.insert(0, "##{}##".format("#" * W))
walled_maze.insert(0, "##{}##".format("#" * W))
walled_maze.append("##{}##".format("#" * W)... | from collections import deque
def solve(H, W, Ch, Cw, Dh, Dw, maze):
# 後の条件分岐を簡略化するためワープしても迷路外に出ないように壁で囲む
walled_maze = ["##{}##".format(row) for row in maze]
walled_maze.insert(0, "##{}##".format("#" * W))
walled_maze.insert(0, "##{}##".format("#" * W))
walled_maze.append("##{}##".format("#" * W)... | replace | 12 | 13 | 12 | 13 | 0 | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define matrix vector<vector<ll>>
#define zero(n, m) matrix(n, vector<ll>(m, 0))
#define one(n, m) matrix(n, vector<ll>(m, 1))
#define pii pair<ll, pair<ll, ll>>
const int N = 1e3 + 5;
ll n, m, stX, stY, enX, enY, dx[4... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define matrix vector<vector<ll>>
#define zero(n, m) matrix(n, vector<ll>(m, 0))
#define one(n, m) matrix(n, vector<ll>(m, 1))
#define pii pair<ll, pair<ll, ll>>
const int N = 1e3 + 5;
ll n, m, stX, stY, enX, enY, dx[4... | insert | 60 | 60 | 60 | 61 | 0 | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FIN \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
typedef long lo... | #include <bits/stdc++.h>
using namespace std;
#define FIN \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
typedef long lo... | replace | 111 | 112 | 111 | 112 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using i16 = std::int16_t;
using i32 = std::int32_t;
using i64 = std::int64_t;
using usize = std::size_t;
using namespace std;
#define rep(i, max) for (i32 i = 0; i < (i32)max; ++i)
#define loop while (true)
#define allOf(collection) collection.begin(), collection.end()
unique_ptr<string> rea... | #include <bits/stdc++.h>
using i16 = std::int16_t;
using i32 = std::int32_t;
using i64 = std::int64_t;
using usize = std::size_t;
using namespace std;
#define rep(i, max) for (i32 i = 0; i < (i32)max; ++i)
#define loop while (true)
#define allOf(collection) collection.begin(), collection.end()
unique_ptr<string> rea... | insert | 164 | 164 | 164 | 166 | TLE | |
p02579 | C++ | Runtime Error |
// Problem : D - Wizard in Maze
// Contest : AtCoder - AtCoder Beginner Contest 176
// URL : https://atcoder.jp/contests/abc176/tasks/abc176_d
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.h... |
// Problem : D - Wizard in Maze
// Contest : AtCoder - AtCoder Beginner Contest 176
// URL : https://atcoder.jp/contests/abc176/tasks/abc176_d
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.h... | replace | 44 | 45 | 44 | 45 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <se... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <se... | replace | 54 | 55 | 54 | 55 | TLE | |
p02579 | C++ | Time Limit Exceeded | /* Aditya0412 */
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define pb push_back
#define ve vector
#define vii vector<int>
#define vll vector<ll>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vpl vector<pll>
#define fi first
#define all(a) (a).begin(), (a).end()
#define si(x) ... | /* Aditya0412 */
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define pb push_back
#define ve vector
#define vii vector<int>
#define vll vector<ll>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vpl vector<pll>
#define fi first
#define all(a) (a).begin(), (a).end()
#define si(x) ... | insert | 176 | 176 | 176 | 177 | TLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <cmath>
using ll = long long;
using namespace std;
stack<int> st;
queue<int> qu;
queue<pair<int, int>> qu2;
priority_queue<int> pq;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, n) for (int i = 1; i <= (int)(n); i++)
#define mins(x, y) x = min(x, y)
#define maxs(... | #include <bits/stdc++.h>
#include <cmath>
using ll = long long;
using namespace std;
stack<int> st;
queue<int> qu;
queue<pair<int, int>> qu2;
priority_queue<int> pq;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, n) for (int i = 1; i <= (int)(n); i++)
#define mins(x, y) x = min(x, y)
#define maxs(... | replace | 82 | 83 | 82 | 83 | 0 | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
typedef long long ll;
using namespace std;
const ll MAX = 200000;
const ll INF = 1001001001;
const ll MOD = 1000000007;
const double PI = 3.1415926535897932;
ll H, W, h1, w1, h2, w2, ans = -1, tmp = 0;
string S;
ll dy[] = {1, 0, -1, 0};
ll dx[] = {0, 1, 0, -1};
vector<ll... | #include <bits/stdc++.h>
#define int long long
typedef long long ll;
using namespace std;
const ll MAX = 200000;
const ll INF = 1001001001;
const ll MOD = 1000000007;
const double PI = 3.1415926535897932;
ll H, W, h1, w1, h2, w2, ans = -1, tmp = 0;
string S;
ll dy[] = {1, 0, -1, 0};
ll dx[] = {0, 1, 0, -1};
vector<ll... | replace | 18 | 19 | 18 | 19 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(X, N) for (ll X = 0LL; X < (N); X++)
#define ALL(V) (V).begin(), (V).end()
#define endl "\n"
using namespace std;
typedef long long ll;
const double PI = 3.1415926535897932384626;
const ll MODN = 1000000007;
const ll MODN2 = 998244353;
const double EPS = 1e-10;
int main() {
i... | #include <bits/stdc++.h>
#define rep(X, N) for (ll X = 0LL; X < (N); X++)
#define ALL(V) (V).begin(), (V).end()
#define endl "\n"
using namespace std;
typedef long long ll;
const double PI = 3.1415926535897932384626;
const ll MODN = 1000000007;
const ll MODN2 = 998244353;
const double EPS = 1e-10;
int main() {
i... | delete | 44 | 45 | 44 | 44 | TLE | |
p02579 | C++ | Time Limit Exceeded | /* Aa^~ kokoro ga pyonpyon suru n jaa^~
// ZZZXXkXkkkZ!``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ```
```?Wfpppbpbbpbbpbbbkbkk
// ppbbbpbbpVr`` `` ` ` ` ` ```` `` ` ` `` ` ` ` ` ` ` ` ` `
dppbbkkkkkkkkkkqkqkk
// HkqqqqqkkWr`` ` ` ``` ``` `?G, ` ` ``.JC!```` ` ` `` ``
````(Wpbkkkkkkkkqkkkkkqk
// mmmmmqqqqpr` `` `` ```````... | /* Aa^~ kokoro ga pyonpyon suru n jaa^~
// ZZZXXkXkkkZ!``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ```
```?Wfpppbpbbpbbpbbbkbkk
// ppbbbpbbpVr`` `` ` ` ` ` ```` `` ` ` `` ` ` ` ` ` ` ` ` `
dppbbkkkkkkkkkkqkqkk
// HkqqqqqkkWr`` ` ` ``` ``` `?G, ` ` ``.JC!```` ` ` `` ``
````(Wpbkkkkkkkkqkkkkkqk
// mmmmmqqqqpr` `` `` ```````... | replace | 233 | 234 | 233 | 234 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#define PI 3.14159265359
typedef long long ll;
const int MOD = 1e9 + 7;
const ll LLINF = 1e18;
using namespace std;
ll llmin(ll x, ll y) {
... | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#define PI 3.14159265359
typedef long long ll;
const int MOD = 1e9 + 7;
const ll LLINF = 1e18;
using namespace std;
ll llmin(ll x, ll y) {
... | delete | 95 | 100 | 95 | 95 | TLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, a, b) for (int i = a; i < b; i++)
#define each(i, mp) for (auto &i : mp)
const int MAX_W = 500;
const int MAX_H = 500;
const int INF = 1001001;
int h, w, s... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, a, b) for (int i = a; i < b; i++)
#define each(i, mp) for (auto &i : mp)
const int MAX_W = 5000;
const int MAX_H = 5000;
const int INF = 1001001;
int h, w,... | replace | 8 | 10 | 8 | 10 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MM = 1000000000;
const int MOD = MM + 7;
const int MAX = 510000;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define Rep(i, j, n) for (ll i = j; i < n; i++)
#define all(vec) vec.begin(), vec.end()
template <class T> inline bool chmin(T &a, T... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MM = 1000000000;
const int MOD = MM + 7;
const int MAX = 510000;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define Rep(i, j, n) for (ll i = j; i < n; i++)
#define all(vec) vec.begin(), vec.end()
template <class T> inline bool chmin(T &a, T... | replace | 41 | 43 | 41 | 44 | TLE | |
p02579 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, 1, 0, -1};
int main() {
int h, w;
cin >> h >> w;
int si, sj;
cin >> si >> sj;
int t... | #include <iostream>
#include <queue>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, 1, 0, -1};
int main() {
int h, w;
cin >> h >> w;
int si, sj;
cin >> si >> sj;
int t... | replace | 54 | 55 | 54 | 55 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
int main() {
int H, W, Ch, Cw, Dh, Dw;
std::cin >> H >> W >> Ch >> Cw >> Dh >> Dw;
std::vector<std::string> S(H);
for (int i = 0; i < H; i++) {
std::cin >> S[i];
}
std::vector<std::vector<int>> warp_min(H, std::vector<int>(W, 1e9));
std::deque<int> H_pos;
std::deque<int> ... | #include <bits/stdc++.h>
int main() {
int H, W, Ch, Cw, Dh, Dw;
std::cin >> H >> W >> Ch >> Cw >> Dh >> Dw;
std::vector<std::string> S(H);
for (int i = 0; i < H; i++) {
std::cin >> S[i];
}
std::vector<std::vector<int>> warp_min(H, std::vector<int>(W, 1e9));
std::deque<int> H_pos;
std::deque<int> ... | replace | 49 | 52 | 49 | 52 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a) for (int i = 0; i < (a); i++)
typedef pair<int, int> P;
typedef long long ll;
const int INF = 1001001001;
const int MOD = 1000000007;
const double PI = acos(-1);
int H, W, Ch, Cw, Dh, Dw;
int dx[4] = {-1, 1, 0, 0};
int dy[4] = {0, 0, 1, -1};
bool mov... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a) for (int i = 0; i < (a); i++)
typedef pair<int, int> P;
typedef long long ll;
const int INF = 1001001001;
const int MOD = 1000000007;
const double PI = acos(-1);
int H, W, Ch, Cw, Dh, Dw;
int dx[4] = {-1, 1, 0, 0};
int dy[4] = {0, 0, 1, -1};
bool mov... | insert | 73 | 73 | 73 | 74 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long;
const ll INF = (ll)1e18 + 1;
const ll... | #include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long;
const ll INF = (ll)1e18 + 1;
const ll... | replace | 19 | 20 | 19 | 21 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define For(i, a, b) for (int(i) = (int)(a); (i) < (int)(b); ++(i))
#define rFor(i, a, b) for (int(i) = (int)(a)-1; (i) >= (int)(b); --(i))
#define rep(i, n) For((i), 0, (n))
#define rrep(i, n) rFor((i), (n), 0)
#define fi first
#define se second
using namespace std;
typedef long long lint;
typ... | #include <bits/stdc++.h>
#define For(i, a, b) for (int(i) = (int)(a); (i) < (int)(b); ++(i))
#define rFor(i, a, b) for (int(i) = (int)(a)-1; (i) >= (int)(b); --(i))
#define rep(i, n) For((i), 0, (n))
#define rrep(i, n) rFor((i), (n), 0)
#define fi first
#define se second
using namespace std;
typedef long long lint;
typ... | replace | 83 | 84 | 83 | 84 | TLE | |
p02579 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
//... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
//... | replace | 48 | 49 | 48 | 49 | 0 | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int H, W, C_h, C_w, D_h, D_w;
cin >> H >> W >> C_h >> C_w >> D_h >> D_w;
C_h--;
C_w--;
D_h--;
D_w--;
char S[H][W];
for (int i = 0; i < H; i++) {
string s;
cin >> s;
for (int j = 0; j < W; j++) {
S[i][j] = ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int H, W, C_h, C_w, D_h, D_w;
cin >> H >> W >> C_h >> C_w >> D_h >> D_w;
C_h--;
C_w--;
D_h--;
D_w--;
char S[H][W];
for (int i = 0; i < H; i++) {
string s;
cin >> s;
for (int j = 0; j < W; j++) {
S[i][j] = ... | replace | 26 | 27 | 26 | 27 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
#define all(x) (x).begin(), (x).end()
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chma... | #include <bits/stdc++.h>
using namespace std;
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
#define all(x) (x).begin(), (x).end()
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chma... | replace | 37 | 38 | 37 | 38 | TLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int MAX = 100;
const int INF = 1e9;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int ei[] = {-2, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, 0,
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int MAX = 1000;
const int INF = 1e9;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int ei[] = {-2, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, 0,
... | replace | 5 | 6 | 5 | 6 | 0 | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define endl "\n"
i64 dh[4] = {-1, 1, 0, 0}, dw[4] = {0, 0, -1, 1};
int main() {
i64 H, W, Ch, Cw, Dh, Dw;
cin >> H >> W >> Ch >> Cw >> Dh >> Dw;
Ch--;
Cw--;
Dh--;
Dw--;
vector<string> S(H);
for (i64 i = 0; i < H; i++)
cin >> S[i... | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define endl "\n"
i64 dh[4] = {-1, 1, 0, 0}, dw[4] = {0, 0, -1, 1};
int main() {
i64 H, W, Ch, Cw, Dh, Dw;
cin >> H >> W >> Ch >> Cw >> Dh >> Dw;
Ch--;
Cw--;
Dh--;
Dw--;
vector<string> S(H);
for (i64 i = 0; i < H; i++)
cin >> S[i... | replace | 29 | 30 | 29 | 30 | 0 | |
p02579 | C++ | Time Limit Exceeded | #line 1 "/workspaces/compro/lib/template.hpp"
#line 1 "/workspaces/compro/lib/io/vector.hpp"
#include <iostream>
#include <vector>
#ifndef IO_VECTOR
#define IO_VECTOR
template <class T>
std::ostream &operator<<(std::ostream &out, const std::vector<T> &v) {
int size = v.size();
for (int i = 0; i < size; i++) {
... | #line 1 "/workspaces/compro/lib/template.hpp"
#line 1 "/workspaces/compro/lib/io/vector.hpp"
#include <iostream>
#include <vector>
#ifndef IO_VECTOR
#define IO_VECTOR
template <class T>
std::ostream &operator<<(std::ostream &out, const std::vector<T> &v) {
int size = v.size();
for (int i = 0; i < size; i++) {
... | replace | 93 | 94 | 93 | 95 | TLE | |
p02579 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
using LL = long long;
bool is_visited(vector<vector<int>> &num, vector<vector<int>> &S, int ig,
int jg, int is, int js, int H, int W) {
if (ig <= 0 || ig > H || jg <= 0 || jg > W) {
return false;
}
if (num[ig][jg] == ... | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
using LL = long long;
bool is_visited(vector<vector<int>> &num, vector<vector<int>> &S, int ig,
int jg, int is, int js, int H, int W) {
if (ig <= 0 || ig > H || jg <= 0 || jg > W) {
return false;
}
if (num[ig][jg] == ... | insert | 162 | 162 | 162 | 165 | -11 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int nax = 1e3 + 3;
using pi = pair<int, int>;
#define x first
#define y second
pair<int, int> operator+(const pi &a, const pi &b) {
return make_pair(a.x + b.x, a.y + b.y);
}
// 0-1 BFS is Dijkstra.
bool bor[nax][nax];
int lvl[nax][nax];
int n, m;
bool safe(int i, i... | #include <bits/stdc++.h>
using namespace std;
const int nax = 1e3 + 3;
using pi = pair<int, int>;
#define x first
#define y second
pair<int, int> operator+(const pi &a, const pi &b) {
return make_pair(a.x + b.x, a.y + b.y);
}
// 0-1 BFS is Dijkstra.
bool bor[nax][nax];
int lvl[nax][nax];
int n, m;
bool safe(int i, i... | replace | 65 | 66 | 65 | 66 | TLE | |
p02579 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = int;
const ll MOD = 1000000007;
// const ll MOD=998244353;
const long long INF = 1 << 30;
const double pi = acos(-1.0);
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
... | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = int;
const ll MOD = 1000000007;
// const ll MOD=998244353;
const long long INF = 1 << 30;
const double pi = acos(-1.0);
template <class T> inline bool chmin(T &a, T b) {
if (a > b) ... | replace | 0 | 1 | 0 | 1 | TLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
struct node {
int x, y;
} t;
char a[1005][1005];
int inq[1005][1005];
int n, m;
deque<node> q;
bool check(int x, int y, int w) {
return !(inq[x][y] <= w || x < 1 || x > n || y < 1 || y > m);
}
s... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
struct node {
int x, y;
} t;
char a[1005][1005];
int inq[1005][1005];
int n, m;
deque<node> q;
bool check(int x, int y, int w) {
return !(x < 1 || x > n || y < 1 || y > m || inq[x][y] <= w);
}
s... | replace | 12 | 13 | 12 | 13 | 0 | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll h, w, ch, cw, dh, dw;
char tb[1005][1005];
ll mp[1005][1005];
vector<ll> v[100005];
map<pair<ll, ll>, ll> mp2;
map<ll, ll> mp3;
void dfs(ll rw, ll col, ll ind) {
if (rw <= 0 || rw > h || col <= 0 || col > w)
return;
if (mp[rw][col] != 0)... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll h, w, ch, cw, dh, dw;
char tb[1005][1005];
ll mp[1005][1005];
vector<ll> v[1000005];
map<pair<ll, ll>, ll> mp2;
map<ll, ll> mp3;
void dfs(ll rw, ll col, ll ind) {
if (rw <= 0 || rw > h || col <= 0 || col > w)
return;
if (mp[rw][col] != 0... | replace | 6 | 7 | 6 | 7 | 0 | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
const int dy[4] = {1, 0, -1, 0};
const int dx[4] = {0, 1, 0, -1};
int main() {
int h, w, ch, cw, dh, dw;
cin >> h >> w >> ch >> cw >> dh >> dw;
ch--, cw--, dh--, dw--;
vector<string> s(h);... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
const int dy[4] = {1, 0, -1, 0};
const int dx[4] = {0, 1, 0, -1};
int main() {
int h, w, ch, cw, dh, dw;
cin >> h >> w >> ch >> cw >> dh >> dw;
ch--, cw--, dh--, dw--;
vector<string> s(h);... | delete | 23 | 24 | 23 | 23 | 0 | |
p02579 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define per(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define pb push_back
#define mp make_pair
#define ... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define per(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define pb push_back
#define mp make_pair
#define ... | insert | 52 | 52 | 52 | 54 | -11 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using VI = vector<int>;
using VL = vector<ll>;
using VS = vector<string>;
template <class T> using PQ = priority_queue<T, vector<T>, greater<T>>;
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define eFOR(i, a, n) for (in... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using VI = vector<int>;
using VL = vector<ll>;
using VS = vector<string>;
template <class T> using PQ = priority_queue<T, vector<T>, greater<T>>;
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define eFOR(i, a, n) for (in... | replace | 111 | 115 | 111 | 122 | TLE | |
p02579 | 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;
typedef pair<int, int> P;
char s[1005][1005];
int cnt[1005][1005];
int INF = 1001001001;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, -1, 0, 1};
int H, W;
vector<vector<P>> X(100000);
void umeru(int h,... | #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;
char s[1005][1005];
int cnt[1005][1005];
int INF = 1001001001;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, -1, 0, 1};
int H, W;
vector<vector<P>> X(1000000);
void umeru(int h... | replace | 15 | 16 | 15 | 16 | 0 | |
p02579 | C++ | Time Limit Exceeded | //{{{
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <sys/time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using ll... | //{{{
#include <algorithm>
#include <cmath>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <sys/time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using ll... | insert | 78 | 78 | 78 | 79 | TLE | |
p02579 | C++ | Memory 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 | 38 | 39 | 38 | 39 | MLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
#define lint long long
#define st first
#define nd second
#define INF 0x3f3f3f3f
#define N 103
using namespace std;
int mar[N][N];
char grid[N][N];
int id = 1;
int n, m;
void go(int i, int j, int x) {
if (i < 0 || i >= n)
return;
if (j < 0 || j >= m)
return;
if (grid[i][j] == '... | #include <bits/stdc++.h>
#define lint long long
#define st first
#define nd second
#define INF 0x3f3f3f3f
#define N 1003
using namespace std;
int mar[N][N];
char grid[N][N];
int id = 1;
int n, m;
void go(int i, int j, int x) {
if (i < 0 || i >= n)
return;
if (j < 0 || j >= m)
return;
if (grid[i][j] == ... | replace | 5 | 6 | 5 | 6 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
// #include <atcoder/all>
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
using namespace std;
// using namespace atcoder;
int main() {
int h, w, sy, sx, gy, gx;
cin >> h >> w >> sy >> sx >> gy >> gx;
sy--, sx--, gy--, gx--;
string s[h];
for (int i = 0; i < h; i... | #include <bits/stdc++.h>
// #include <atcoder/all>
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
using namespace std;
// using namespace atcoder;
int main() {
int h, w, sy, sx, gy, gx;
cin >> h >> w >> sy >> sx >> gy >> gx;
sy--, sx--, gy--, gx--;
string s[h];
for (int i = 0; i < h; i... | replace | 21 | 23 | 21 | 23 | TLE | |
p02579 | C++ | Runtime Error | /* In The Name of Anton*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repa(i, a, n) for (int i = a; i <= n; i++)
#define repb(i, a, n) for (int i = a; i >= n; i--)
#define trav(a, x) for (auto a = x.begin(); a != x.end(); a++)
#define all(x) x.begin(), x.end()
#... | /* In The Name of Anton*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repa(i, a, n) for (int i = a; i <= n; i++)
#define repb(i, a, n) for (int i = a; i >= n; i--)
#define trav(a, x) for (auto a = x.begin(); a != x.end(); a++)
#define all(x) x.begin(), x.end()
#... | replace | 112 | 114 | 112 | 114 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) v.begin(), v.end()
#define len(x) (ll)(x).length()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
int main() {
int h, w;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) v.begin(), v.end()
#define len(x) (ll)(x).length()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
int main() {
int h, w;
... | replace | 54 | 55 | 54 | 55 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int dr[] = {1, 0, -1, 0}; // S,SE,E,NE,N,NW,W,SW
int dc[] = {0, 1, 0, -1}; // neighbors
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int h, w, ch, cw, dh, dw;
cin >> h >> w >> ch >> cw >> dh >> dw;
ch--;
cw--;
dh--;
dw--;
int dis... | #include <bits/stdc++.h>
using namespace std;
int dr[] = {1, 0, -1, 0}; // S,SE,E,NE,N,NW,W,SW
int dc[] = {0, 1, 0, -1}; // neighbors
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int h, w, ch, cw, dh, dw;
cin >> h >> w >> ch >> cw >> dh >> dw;
ch--;
cw--;
dh--;
dw--;
int dis... | replace | 46 | 47 | 46 | 47 | TLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define speed ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define bug cout << "ok" << endl
const ll INF = 1e9 + 5, N = 1e2 + 5, mod = 1e9 + 7, M = 1e6 + 5;
char a[N][N];
int main() {
speed;
int n, m;
cin >> n >>... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define speed ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define bug cout << "ok" << endl
const ll INF = 1e9 + 5, N = 1e3 + 5, mod = 1e9 + 7, M = 1e6 + 5;
char a[N][N];
int main() {
speed;
int n, m;
cin >> n >>... | replace | 9 | 10 | 9 | 10 | 0 | |
p02579 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define ll long long
#define pii pair<int, int>
#define mp make_pair
#define fi first
#define se second
#define inf 0x7ffff... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define ll long long
#define pii pair<int, int>
#define mp make_pair
#define fi first
#define se second
#define inf 0x7ffff... | insert | 32 | 32 | 32 | 33 | 0 | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// dijkstra
struct edge {
int to;
int cost;
};
using P = pair<int, int>;
const int MAX_N = 1e6;
const int INF = 1e9;
vector<edge> G[MAX_N];
vector<int> dist(MAX_N, INF);
void dijkstra(int s) {
priority_queue<P, vector<P>, greater<P>> PQ;
dist[s] = 0;
PQ.push(P... | #include <bits/stdc++.h>
using namespace std;
// dijkstra
struct edge {
int to;
int cost;
};
using P = pair<int, int>;
const int MAX_N = 1e6;
const int INF = 1e9;
vector<edge> G[MAX_N];
vector<int> dist(MAX_N, INF);
void dijkstra(int s) {
priority_queue<P, vector<P>, greater<P>> PQ;
dist[s] = 0;
PQ.push(P... | replace | 56 | 57 | 56 | 58 | -11 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
int main() {
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int N, M;
cin >> N >> M;
int sx, sy, ex, ey;
cin >> sx >> sy >> ex >> ey;
sx--, sy--, ex--, ey--;
vector<string> A(N);
for (int i = 0; i < N; i++) {
cin >> A[i];
... | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
int main() {
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int N, M;
cin >> N >> M;
int sx, sy, ex, ey;
cin >> sx >> sy >> ex >> ey;
sx--, sy--, ex--, ey--;
vector<string> A(N);
for (int i = 0; i < N; i++) {
cin >> A[i];
... | replace | 42 | 43 | 42 | 43 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define pp pair<int, int>
#define ppn pair<int, pp>
#define F first
#define S second
#define N 300005
#define mod 1000000007
#define pi 3.14159265358979323846
using namespace std;
int n, m, a, b, xxx, yyy, ans;
char s[1005][1005];
int dp[1005][1005];
int xx[] = {-1, 0, 0... | #include <bits/stdc++.h>
#define ll long long
#define pp pair<int, int>
#define ppn pair<int, pp>
#define F first
#define S second
#define N 300005
#define mod 1000000007
#define pi 3.14159265358979323846
using namespace std;
int n, m, a, b, xxx, yyy, ans;
char s[1005][1005];
int dp[1005][1005];
int xx[] = {-1, 0, 0... | insert | 29 | 29 | 29 | 31 | TLE | |
p02579 | 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;
typedef pair<int, int> P;
const int MAX_HW = 1005;
char S[MAX_HW][MAX_HW];
int ans[MAX_HW][MAX_HW];
int H, W;
queue<P> Q[10005];
int dx[5] = {-2, -1, 0, 1, 2}, dy[5] = {-2, -1, 0, 1, 2};
int dx2[4] = {0, 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;
const int MAX_HW = 1005;
char S[MAX_HW][MAX_HW];
int ans[MAX_HW][MAX_HW];
int H, W;
queue<P> Q[500000];
int dx[5] = {-2, -1, 0, 1, 2}, dy[5] = {-2, -1, 0, 1, 2};
int dx2[4] = {0, 1... | replace | 9 | 10 | 9 | 10 | 0 | |
p02579 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <ctime>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <memory.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <u... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <ctime>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <memory.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <u... | replace | 47 | 49 | 47 | 49 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 1e3 + 7;
int h, w, ch, cw, dh, dw;
char grid[N][N];
int visited[N][N];
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> h >> w >> ch >> cw >> dh >> dw;
for (int i = 1; i <= h; i++)
for (int j = 1; j ... | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 1e3 + 7;
int h, w, ch, cw, dh, dw;
char grid[N][N];
int visited[N][N];
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> h >> w >> ch >> cw >> dh >> dw;
for (int i = 1; i <= h; i++)
for (int j = 1; j ... | replace | 46 | 48 | 46 | 52 | TLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
template <class c, class cmp = less<c>>
using ordered_set =
tree<c, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
#define IOS ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
template <class c, class cmp = less<c>>
using ordered_set =
tree<c, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
#define IOS ... | replace | 55 | 56 | 55 | 56 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
const int ddx[] = {0, 1, 1, 0, 2, 1, -1, -2, 2, 2,
-2, -2, 1, -1, 1, -1, 2, 2, -2, -2};
const int ddy[] = {2, 1, -1, -2, 0, 1, 1, 0, 2, -2,
2, -2, 2, 2, -2, -... | #include "bits/stdc++.h"
using namespace std;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
const int ddx[] = {0, 1, 1, 0, 2, 1, -1, -2, 2, 2,
-2, -2, 1, -1, 1, -1, 2, 2, -2, -2};
const int ddy[] = {2, 1, -1, -2, 0, 1, 1, 0, 2, -2,
2, -2, 2, 2, -2, -... | insert | 39 | 39 | 39 | 43 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
typedef long long ll;
const ll MOD = 1e9 + 7;
const long long INF = 1LL << 60;
const double PI = 3.14159265358979323846;
const int NMAX = 100005;
using namespa... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
typedef long long ll;
const ll MOD = 1e9 + 7;
const long long INF = 1LL << 60;
const double PI = 3.14159265358979323846;
const int NMAX = 100005;
using namespa... | insert | 67 | 67 | 67 | 68 | TLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long int ll;
typedef long double db;
#define pb push_back
#define mp make_pair
#define ub(v, val) upper_bound(v.begin(), v.end(), val)
#define np(str) next_permutation(str.begin(), str.end())
#define lb(v, val) lower_bound(v.begin(), v.end()... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long int ll;
typedef long double db;
#define pb push_back
#define mp make_pair
#define ub(v, val) upper_bound(v.begin(), v.end(), val)
#define np(str) next_permutation(str.begin(), str.end())
#define lb(v, val) lower_bound(v.begin(), v.end()... | replace | 101 | 102 | 101 | 102 | -11 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base ::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, m;
cin >> n >> m;
int x, y;
cin >> x >> y;
int t_x, t_y;
cin >> t_x >> t_y;
x--, y--;
t_x--, t_y--;
vector<vector<char>> grid(n, vector<char>(m));
for (int i... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base ::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, m;
cin >> n >> m;
int x, y;
cin >> x >> y;
int t_x, t_y;
cin >> t_x >> t_y;
x--, y--;
t_x--, t_y--;
vector<vector<char>> grid(n, vector<char>(m));
for (int i... | replace | 46 | 47 | 46 | 50 | TLE | |
p02579 | C++ | Runtime Error | /**
* author: Dooloper
* created: 16.09.2020 23:48:27
**/
#pragma region Macros
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repn(i, n) for (int i = 1; i <= (n); i++)
#define p... | /**
* author: Dooloper
* created: 16.09.2020 23:48:27
**/
#pragma region Macros
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repn(i, n) for (int i = 1; i <= (n); i++)
#define p... | replace | 83 | 84 | 83 | 84 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define CHOOSE(a) CHOOSE2 a
#define CHOOSE2(a0, a1, a2, a3, a4, x, ...) x
#define dump_1(x1) cerr << #x1 << ": " << x1 << endl
#define dump_2(x1, x2) \
cerr << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << endl
#define dump_3(x1, x2, x... | #include <bits/stdc++.h>
#define CHOOSE(a) CHOOSE2 a
#define CHOOSE2(a0, a1, a2, a3, a4, x, ...) x
#define dump_1(x1) cerr << #x1 << ": " << x1 << endl
#define dump_2(x1, x2) \
cerr << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << endl
#define dump_3(x1, x2, x... | insert | 69 | 69 | 69 | 71 | TLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
#define FOR(i, a, b) for (register int i = (a); i < (b); ++i)
#define ROF(i, a, b) for (register int i = (a); i >= (b); --i)
#define pi pair<int, int>
#define mk(a, b) make_pair(a, b)
#define mygc(c) (c) = getchar()
#define mypc(c) putchar(c)
#define fi first
#define se second
#define ls(x) t[x... | #include <bits/stdc++.h>
#define FOR(i, a, b) for (register int i = (a); i < (b); ++i)
#define ROF(i, a, b) for (register int i = (a); i >= (b); --i)
#define pi pair<int, int>
#define mk(a, b) make_pair(a, b)
#define mygc(c) (c) = getchar()
#define mypc(c) putchar(c)
#define fi first
#define se second
#define ls(x) t[x... | replace | 190 | 192 | 190 | 192 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define all(n) begin(n), end(n)
const long long INF = numeric_limits<long long>::max();
typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int>> vvint;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef unsigned long long ull;
template <clas... | #include <bits/stdc++.h>
using namespace std;
#define all(n) begin(n), end(n)
const long long INF = numeric_limits<long long>::max();
typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int>> vvint;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef unsigned long long ull;
template <clas... | replace | 89 | 90 | 89 | 90 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e3 + 5;
int h, w;
int sx, sy, ex, ey;
int d[N][N];
string s[N];
int check(int x, int y) {
if (x >= 0 && x < h && y >= 0 && y < w && s[x][y] == '.')
return 1;
return 0;
}
int bfs() {
deque<pair<int, int>> q;
q.push_back({sx,... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e3 + 5;
int h, w;
int sx, sy, ex, ey;
int d[N][N];
string s[N];
int check(int x, int y) {
if (x >= 0 && x < h && y >= 0 && y < w && s[x][y] == '.')
return 1;
return 0;
}
void bfs() {
deque<pair<int, int>> q;
q.push_back({sx... | replace | 15 | 16 | 15 | 16 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) FOR(i, 0, (n))
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define LAR(a, b) ((a) = max((a), (b)))
#define SML(a, b) ((a) = min((a), (b)))
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vl = vector<ll>;
using pii = pai... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) FOR(i, 0, (n))
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define LAR(a, b) ((a) = max((a), (b)))
#define SML(a, b) ((a) = min((a), (b)))
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vl = vector<ll>;
using pii = pai... | insert | 60 | 60 | 60 | 61 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (long long int i = 0; i < n; i++)
#define _rep(i, m, n) for (long long int i = m; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const ll mod = 1000000007;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll gcd(ll A, ll ... | #include <bits/stdc++.h>
#define rep(i, n) for (long long int i = 0; i < n; i++)
#define _rep(i, m, n) for (long long int i = m; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const ll mod = 1000000007;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll gcd(ll A, ll ... | replace | 113 | 114 | 113 | 114 | TLE | |
p02579 | Python | Time Limit Exceeded | # 参考: White_Pie_46
# https://atcoder.jp/contests/abc176/submissions/16168825
from collections import deque
def main():
height, width = [int(x) for x in input().split()]
init_h, init_w = [int(x) - 1 for x in input().split()]
dest_h, dest_w = [int(x) - 1 for x in input().split()]
grid = [list(input()) f... | # 参考: White_Pie_46
# https://atcoder.jp/contests/abc176/submissions/16168825
from collections import deque
def main():
height, width = [int(x) for x in input().split()]
init_h, init_w = [int(x) - 1 for x in input().split()]
dest_h, dest_w = [int(x) - 1 for x in input().split()]
grid = [list(input()) f... | insert | 30 | 30 | 30 | 34 | TLE | |
p02579 | C++ | Time Limit Exceeded | // D - Wizard in Maze
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
#define all(x) (x).begin(), (x).end()
#define rp(i, s, e) for (int i = (int)(s); i < (int)(e); ++i)
#define irp(i, s, e) for (int i = (int)(s); i > (int)(e); --i)
using PR = pair<int... | // D - Wizard in Maze
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
#define all(x) (x).begin(), (x).end()
#define rp(i, s, e) for (int i = (int)(s); i < (int)(e); ++i)
#define irp(i, s, e) for (int i = (int)(s); i > (int)(e); --i)
using PR = pair<int... | replace | 58 | 59 | 58 | 59 | TLE | |
p02579 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <ctype.h>
#include <queue>
const int bufSize = 1e6;
#define DEBUG
inline char nc() {
#ifdef DEBUG
return getchar();
#endif
static char buf[bufSize], *p1 = buf, *p2 = buf;
return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, bufSize, stdin), p1 == p... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <ctype.h>
#include <queue>
const int bufSize = 1e6;
#define DEBUG
inline char nc() {
#ifdef DEBUG
return getchar();
#endif
static char buf[bufSize], *p1 = buf, *p2 = buf;
return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, bufSize, stdin), p1 == p... | replace | 27 | 29 | 27 | 29 | 0 | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
int main() {
/* 頂点を探索するときに使う(右, 下, 左, 上) */
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int h, w;
int cw, ch;
int dw, dh;
std::cin >> h >> w >> cw >> ch >> dw >> dh;
--cw, --ch, --dw, --dh; // 0-indexed
std::vector<std::string> maze(h);
for (int i = ... | #include <bits/stdc++.h>
int main() {
/* 頂点を探索するときに使う(右, 下, 左, 上) */
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int h, w;
int cw, ch;
int dw, dh;
std::cin >> h >> w >> ch >> cw >> dh >> dw;
--cw, --ch, --dw, --dh; // 0-indexed
std::vector<std::string> maze(h);
for (int i = ... | replace | 10 | 11 | 10 | 11 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define INF 1000000007
#define LINF (1LL << 62)
#define PI 3.14159265358979
typedef long long i64;
typedef pair<i64, i64> P;
inline i64 mod(i64 a, i64 m) { return (a % m + m) % m; }
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return ... | #include <bits/stdc++.h>
using namespace std;
#define INF 1000000007
#define LINF (1LL << 62)
#define PI 3.14159265358979
typedef long long i64;
typedef pair<i64, i64> P;
inline i64 mod(i64 a, i64 m) { return (a % m + m) % m; }
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return ... | replace | 44 | 45 | 44 | 45 | TLE | |
p02579 | C++ | Runtime Error | /* #region Head */
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pll = pair<ll, ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vc<vc<T>>;
using vll = vc<ll>;
using vvll = vvc<ll>... | /* #region Head */
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pll = pair<ll, ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vc<vc<T>>;
using vll = vc<ll>;
using vvll = vvc<ll>... | replace | 331 | 332 | 331 | 332 | -6 | f74a617f-c4a6-43f6-b01a-15a30f52c569.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02579/C++/s664238343.cpp:290: void solve(): Assertion `false' failed.
|
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ull = uint64_t;
const ll INF = 9e18;
int main() {
ll H, W;
cin >> H >> W;
ll sh, sw, gh, gw;
cin >> sh >> sw;
cin >> gh >> gw;
sh--;
sw--;
gh--;
gw--;
// 道の一覧
vector<vector<bool>> roads(H, vector<bool>(W, false));
for (ll ... | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ull = uint64_t;
const ll INF = 9e18;
int main() {
ll H, W;
cin >> H >> W;
ll sh, sw, gh, gw;
cin >> sh >> sw;
cin >> gh >> gw;
sh--;
sw--;
gh--;
gw--;
// 道の一覧
vector<vector<bool>> roads(H, vector<bool>(W, false));
for (ll ... | replace | 33 | 34 | 33 | 34 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <cmath> //sqrt pow
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <deque> // dequef
#includ... | #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <cmath> //sqrt pow
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <deque> // dequef
#includ... | replace | 71 | 72 | 71 | 72 | TLE | |
p02579 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
const ll MAX = 1001001;
const ll MOD = 1000000007;
struct edge {
ll to, cost;
};
typedef vector<vector<edge>> AdjList;... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
const ll MAX = 1001001;
const ll MOD = 1000000007;
struct edge {
ll to, cost;
};
typedef vector<vector<edge>> AdjList;... | insert | 88 | 88 | 88 | 91 | MLE | |
p02579 | C++ | Time Limit Exceeded | #pragma region template
// clang-format off
#ifdef ONLINE_JUDGE
#pragma GCC target("avx2")
#pragma GCC optimize("tree-vectorize")
#pragma GCC diagnostic ignored "-Wunused-result"
#define here
#define com(msg)
#define obs(...)
#define see(vec)
#define local(x)
#define alter(x,y) y
#else
#define here ... | #pragma region template
// clang-format off
#ifdef ONLINE_JUDGE
#pragma GCC target("avx2")
#pragma GCC optimize("tree-vectorize")
#pragma GCC diagnostic ignored "-Wunused-result"
#define here
#define com(msg)
#define obs(...)
#define see(vec)
#define local(x)
#define alter(x,y) y
#else
#define here ... | replace | 201 | 202 | 201 | 202 | TLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int a, b, k, x1, y_1, x2, y2, d[500005], v[1005][1005];
bool n[1005][1005], vi[500005];
char c;
struct st {
int w, v;
st(int V, int W) {
w = W;
v = V;
}
};
struct st1 {
int w, dd;
st1() {}
st1(int W, int DD) {
w = W;
dd = DD;
}
friend bool op... | #include <bits/stdc++.h>
using namespace std;
int a, b, k, x1, y_1, x2, y2, d[500005], v[1005][1005];
bool n[1005][1005], vi[500005];
char c;
struct st {
int w, v;
st(int V, int W) {
w = W;
v = V;
}
};
struct st1 {
int w, dd;
st1() {}
st1(int W, int DD) {
w = W;
dd = DD;
}
friend bool op... | replace | 22 | 23 | 22 | 23 | 0 | |
p02579 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <ctype.h>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define REP(i, n) for (ll i = 0; i < (ll)(n); ++i)
templa... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <ctype.h>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define REP(i, n) for (ll i = 0; i < (ll)(n); ++i)
templa... | replace | 30 | 32 | 30 | 32 | 0 | |
p02579 | C++ | Runtime Error | // #pragma GCC optimize "trapv"
//-D_GLIBCXX_DEBUG
#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;
#define pm(m) \
for (auto itr = (m).begin(); itr !... | // #pragma GCC optimize "trapv"
//-D_GLIBCXX_DEBUG
#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;
#define pm(m) \
for (auto itr = (m).begin(); itr !... | replace | 90 | 92 | 90 | 92 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
using namespace __gnu_pbds;
typedef tree<pair<ll, pair<ll, ll>>, null_type, less<pair<ll, pair<ll, ll>>>,
rb_tree_tag, tree_order_statistics_node_update>
... | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
using namespace __gnu_pbds;
typedef tree<pair<ll, pair<ll, ll>>, null_type, less<pair<ll, pair<ll, ll>>>,
rb_tree_tag, tree_order_statistics_node_update>
... | replace | 114 | 115 | 114 | 116 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
using pll = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, l, r) for (ll i = (l); i <= (ll)(r); i++)
#define rep3(i, l, r) for... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
using pll = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, l, r) for (ll i = (l); i <= (ll)(r); i++)
#define rep3(i, l, r) for... | replace | 66 | 67 | 66 | 67 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <fstream> //ファイルストリーム(標準入力変更用)
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> /... | #include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <fstream> //ファイルストリーム(標準入力変更用)
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> /... | replace | 135 | 136 | 135 | 136 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
/// mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
const int N = 1010;
int n, m;
char a[N][N];
int d[N][N];
bool valid(int x, int y) { return (x >= 1 && x <= n && y >= 1 && y <= m); }
int dx[] = {0, 1, 0, -1... | #include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
/// mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
const int N = 1010;
int n, m;
char a[N][N];
int d[N][N];
bool valid(int x, int y) { return (x >= 1 && x <= n && y >= 1 && y <= m); }
int dx[] = {0, 1, 0, -1... | replace | 39 | 40 | 39 | 40 | TLE | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// マクロ
// forループ関係
// 引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
// Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i, n) for (ll i = 0; i < ll(n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// マクロ
// forループ関係
// 引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
// Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i, n) for (ll i = 0; i < ll(n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for... | replace | 63 | 64 | 63 | 64 | 1 | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define REP(i, j) for (int i = 0; i < j; i++)
#define FORN(i, j, k) for (int i = j; i < k; i++)
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int, int>
#defi... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define REP(i, j) for (int i = 0; i < j; i++)
#define FORN(i, j, k) for (int i = j; i < k; i++)
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int, int>
#defi... | replace | 49 | 50 | 49 | 50 | 0 | |
p02579 | C++ | Runtime Error | #include <iostream>
#include <queue>
using namespace std;
int h, w, g[15][15], ans[15][15], vis[15][15], ch, cw, dh, dw;
string s;
int main() {
cin >> h >> w;
cin >> ch >> cw >> dh >> dw;
for (int i = 1; i <= h; i++) {
cin >> s;
for (int j = 1; j <= w; j++) {
if (s[j - 1] == '.')
g[i][j] =... | #include <iostream>
#include <queue>
using namespace std;
int h, w, g[1005][1005], ans[1005][1005], vis[1005][1005], ch, cw, dh, dw;
string s;
int main() {
cin >> h >> w;
cin >> ch >> cw >> dh >> dw;
for (int i = 1; i <= h; i++) {
cin >> s;
for (int j = 1; j <= w; j++) {
if (s[j - 1] == '.')
... | replace | 4 | 5 | 4 | 5 | 0 | |
p02579 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int H, W, sh, sw, gh, gw;
bool Grid[1010][1010];
int id[1010][1010];
int64_t INF = (1LL << 62);
int64_t MAXN = 100010;
vector<vector<pair<int, int>>> Graph(MAXN);
int64_t dijkstra(int64_t start, int64_t goal) {
priority_queue<pair<int64_t, int64_t>, vector<pair<int64_t,... | #include <bits/stdc++.h>
using namespace std;
int H, W, sh, sw, gh, gw;
bool Grid[1010][1010];
int id[1010][1010];
int64_t INF = (1LL << 62);
int64_t MAXN = 1000010;
vector<vector<pair<int, int>>> Graph(MAXN);
int64_t dijkstra(int64_t start, int64_t goal) {
priority_queue<pair<int64_t, int64_t>, vector<pair<int64_t... | replace | 7 | 8 | 7 | 8 | 0 | |
p02579 | C++ | Time Limit Exceeded | #include <iostream>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
int ch, dh, cw, dw;
cin >> ch >> cw >> dh >> dw;
ch--;
cw--;
dh--;
dw--;
vector<string> s(H);
for (int i = 0; i < H; ++i) {
ci... | #include <iostream>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
int ch, dh, cw, dw;
cin >> ch >> cw >> dh >> dw;
ch--;
cw--;
dh--;
dw--;
vector<string> s(H);
for (int i = 0; i < H; ++i) {
ci... | delete | 100 | 107 | 100 | 100 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <cmath>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std... | #include <algorithm>
#include <climits>
#include <cmath>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std... | replace | 113 | 114 | 113 | 114 | TLE | |
p02579 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
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;
}
const int NIL = -1;
co... | #include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
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;
}
const int NIL = -1;
co... | replace | 66 | 67 | 66 | 67 | TLE | |
p02579 | C++ | Time Limit Exceeded | #pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
#include <algorithm>
#include <array>
#include <bitset>
#include <chrono>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <qu... | #pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
#include <algorithm>
#include <array>
#include <bitset>
#include <chrono>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <qu... | replace | 84 | 85 | 84 | 85 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.