buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
from math import gcd
from collections import Counter
slope=Counter()
slope_zero=0
slope_inf=0
both_zero=0
n=int(input())
for _ in range(n):
a,b=map(int,input().split())
if a==0 and b==0:
both_zero=1
else:
if a==0:
slope_zero+=1
elif b==0:
slope_inf+=1
... | from math import gcd
from collections import Counter
slope=Counter()
slope_zero=0
slope_inf=0
both_zero=0
n=int(input())
for _ in range(n):
a,b=map(int,input().split())
if a==0 and b==0:
both_zero+=1
else:
if a==0:
slope_zero+=1
elif b==0:
slope_inf+=1
... | [["-", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 107]] | 5 | 357 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using st = string;
using ch = char;
using db = double;
using bl = bool;
using vll = vector<long long>;
using vdb = vector<db>;
using vst = vector<st>;
using vch = vector<char>;
using vbl = vector<bl>;
using vvll = vecto... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using st = string;
using ch = char;
using db = double;
using bl = bool;
using vll = vector<long long>;
using vdb = vector<db>;
using vst = vector<st>;
using vch = vector<char>;
using vbl = vector<bl>;
using vvll = vecto... | [["-", 0, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 0, 9, 0, 57, 64, 9, 0, 116, 0, 117]] | 1 | 551 |
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
from math import gcd
mod = int(1e9+7)
n = ii()
cnd = {}
azero = 0
bzero = 0
allzero = 0
for _ in range(n):
... | def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
from math import gcd
mod = int(1e9+7)
n = ii()
cnd = {}
azero = 0
bzero = 0
allzero = 0
for _ in range(n):
... | [["+", 75, 76, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 677, 17, 107], ["+", 75, 76, 8, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102]] | 5 | 444 |
from collections import defaultdict
def gcd(x, y):
if y == 0:
return x
else:
return gcd(y, x % y)
def main():
MOD = 1000000007
N = int(input())
# Ai * Aj + Bi * Bj = 0
# -> Ai * Aj = -Bi * Bj
# -> (Ai/Bi) = -(Aj/Bj)
# のとき、そのイワシ同士は入れられない
# そこで、 Ci = Ai/Bi を約分したもの(かつ... | from collections import defaultdict
def gcd(x, y):
if y == 0:
return x
else:
return gcd(y, x % y)
def main():
MOD = 1000000007
N = int(input())
# Ai * Aj + Bi * Bj = 0
# -> Ai * Aj = -Bi * Bj
# -> (Ai/Bi) = -(Aj/Bj)
# のとき、そのイワシ同士は入れられない
# そこで、 Ci = Ai/Bi を約分したもの(かつ... | [["+", 0, 677, 31, 206, 206, 660, 0, 664, 17, 33]] | 5 | 360 |
# Consider sardines as vectors in 2D plane,
# and grouping them by their tangent(B[i] / A[i]).
Mod = 1000000007
N = gets.to_i
zs = 0 # count of zero vectors
X = []
Y = []
(0...N).each{
a,b = gets.split.map &:to_i
if a == 0 && b == 0
zs += 1; next
end
# limitate arg into [0,pi)
if b < 0
a = -a; b = -... | # Consider sardines as vectors in 2D plane,
# and grouping them by their tangent(B[i] / A[i]).
Mod = 1000000007
N = gets.to_i
zs = 0 # count of zero vectors
X = []
Y = []
(0...N).each{
a,b = gets.split.map &:to_i
if a == 0 && b == 0
zs += 1; next
end
# limitate arg into [0,pi)
if b < 0
a = -a; b = -... | [["-", 8, 734, 0, 738, 12, 739, 0, 738, 12, 743], ["+", 8, 734, 0, 738, 12, 739, 0, 738, 12, 743]] | 4 | 324 |
#include <bits/stdc++.h>
using namespace std;
using fint64 = int_fast64_t;
template <fint64 MOD> struct ModInt {
fint64 x;
ModInt() : x(0) {}
ModInt(fint64 x) : x(x >= 0 ? x % MOD : (MOD - (-x) % MOD) % MOD) {}
// 負号
ModInt operator-() const { return ModInt(-x); }
// 加算
ModInt &operator+=(const ModInt &r... | #include <bits/stdc++.h>
using namespace std;
using fint64 = int_fast64_t;
template <fint64 MOD> struct ModInt {
fint64 x;
ModInt() : x(0) {}
ModInt(fint64 x) : x(x >= 0 ? x % MOD : (MOD - (-x) % MOD) % MOD) {}
// 負号
ModInt operator-() const { return ModInt(-x); }
// 加算
ModInt &operator+=(const ModInt &r... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]] | 1 | 985 |
#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
constexpr long long power(long long b, long long e) {
long long ret = 1;
while (e) {
if (e & 1) {
ret *= b;
ret %= mod;
}
b *= b;
b %= mod;
e >>= 1;
}
return ret;
}
int main() {
int N;
cin >> N;
... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
constexpr long long power(long long b, long long e) {
long long ret = 1;
while (e) {
if (e & 1) {
ret *= b;
ret %= mod;
}
b *= b;
b %= mod;
e >>= 1;
}
return ret;
}
int main() {
int N;
cin >> N;
... | [["-", 0, 11, 12, 16, 31, 2, 63, 118, 17, 131], ["-", 0, 11, 12, 16, 31, 2, 63, 118, 119, 120], ["-", 0, 11, 12, 16, 31, 2, 3, 4, 0, 24], ["+", 0, 11, 12, 16, 31, 69, 341, 342, 0, 70], ["-", 0, 11, 12, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 11, 12, 16, 31, 69, 341, 342, 0, 73]] | 1 | 360 |
import sys
sys.setrecursionlimit(700000)
def s_in():
return input()
def n_in():
return int(input())
def l_in():
return list(map(int, input().split()))
MOD = 1000000007
def mod_add(a, b):
return (a+b)%MOD
def mod_sub(a, b):
return (a+MOD-b)%MOD
def mod_mul(a, b):
return a*b%MOD
#互いに素なa,bについて、a*... | import sys
sys.setrecursionlimit(700000)
def s_in():
return input()
def n_in():
return int(input())
def l_in():
return list(map(int, input().split()))
MOD = 1000000007
def mod_add(a, b):
return (a+b)%MOD
def mod_sub(a, b):
return (a+MOD-b)%MOD
def mod_mul(a, b):
return a*b%MOD
#互いに素なa,bについて、a*... | [["-", 0, 662, 12, 652, 3, 4, 0, 666, 667, 47], ["-", 0, 662, 12, 652, 3, 4, 0, 666, 0, 612]] | 5 | 591 |
from collections import defaultdict
from math import atan2, gcd
N = int(input())
MOD = 1000000007
d = defaultdict(lambda: [0, 0])
zero = 0
pos = []
neg = []
for _ in range(N):
a, b = map(int, input().split())
if a == 0 and b == 0:
zero += 1
continue
if a < 0:
a = -a
b = -b... | from collections import defaultdict
from math import atan2, gcd
N = int(input())
MOD = 1000000007
d = defaultdict(lambda: [0, 0])
zero = 0
pos = []
neg = []
for _ in range(N):
a, b = map(int, input().split())
if a == 0 and b == 0:
zero += 1
continue
if a < 0:
a = -a
b = -b... | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["-", 36, 36, 0, 656, 0, 1, 0, 677, 17, 110], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 17, 107], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 677, 12, 657, 17, 33], ["-", 36, 36, 36, 36, 0, 656, 0, 674, 0, 67... | 5 | 281 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
struct ModInt {
using M = ModInt;
static vector<M> fact, finv;
static long long MOD;
long long v;
// normalize: [-MOD, MOD**2] -> [0, MOD)
ModInt(const long long _v = 0) : v((_v < 0) ? _v % MOD + MOD : _v % MOD) {... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
struct ModInt {
using M = ModInt;
static vector<M> fact, finv;
static long long MOD;
long long v;
// normalize: [-MOD, MOD**2] -> [0, MOD)
ModInt(const long long _v = 0) : v((_v < 0) ? _v % MOD + MOD : _v % MOD) {... | [["-", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["-", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 967 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
struct ModInt {
using M = ModInt;
static vector<M> fact, finv;
static long long MOD;
long long v;
// normalize: [-MOD, MOD**2] -> [0, MOD)
ModInt(const long long _v = 0) : v((_v < 0) ? _v % MOD + MOD : _v % MOD) {... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
struct ModInt {
using M = ModInt;
static vector<M> fact, finv;
static long long MOD;
long long v;
// normalize: [-MOD, MOD**2] -> [0, MOD)
ModInt(const long long _v = 0) : v((_v < 0) ? _v % MOD + MOD : _v % MOD) {... | [["-", 0, 57, 64, 1, 0, 11, 12, 16, 17, 33], ["-", 0, 57, 64, 1, 0, 11, 12, 16, 12, 13]] | 1 | 1,000 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#includ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#includ... | [["-", 0, 27, 28, 69, 341, 342, 0, 83, 0, 13], ["+", 0, 27, 28, 69, 341, 342, 0, 83, 0, 13]] | 1 | 1,372 |
#include <bits/stdc++.h>
#define lli long long int
#define pb push_back
#define mod 1000000007
#pragma GCC optimize("-O2")
#define mod2 998244353
#define MAXN 1000000000
#define v32 vector<int>
#define v64 vector<lli>
#define v1024 vector<vector<int>>
#define v4096 vector<vector<lli>>
#define vt vector
#define f(x, y, ... | #include <bits/stdc++.h>
#define lli long long int
#define pb push_back
#define mod 1000000007
#pragma GCC optimize("-O2")
#define mod2 998244353
#define MAXN 1000000000
#define v32 vector<int>
#define v64 vector<lli>
#define v1024 vector<vector<int>>
#define v4096 vector<vector<lli>>
#define vt vector
#define f(x, y, ... | [["+", 49, 50, 51, 2, 3, 4, 0, 2, 63, 22], ["+", 51, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 51, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 1,023 |
import collections
import math
n = int(input())
m = 0
mod = 10 ** 9 + 7
c = []
d = []
frac = []
for _ in range(n):
a, b = map(int, input().split())
if a == 0 and b == 0:
n -= 1
m += 1
continue
if a == 0:
frac.append('0/1')
elif b == 0:
frac.append(('1/0'))
e... | import collections
import math
n = int(input())
m = 0
mod = 10 ** 9 + 7
c = []
d = []
frac = []
for _ in range(n):
a, b = map(int, input().split())
if a == 0 and b == 0:
n -= 1
m += 1
continue
if a == 0:
frac.append('0/1')
elif b == 0:
frac.append(('1/0'))
e... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 403 |
/*
Charlotteまだ見てない人は見ような!!!!!!!
/ /:/ \:ヽ \
/ / \ ヽ
\__L 彡 ヽ ',
フ / / / / , ヽ ', j
レ / / / ', ヽ j
// ! /_l_/__ノ { \} ', ',/
... | /*
Charlotteまだ見てない人は見ような!!!!!!!
/ /:/ \:ヽ \
/ / \ ヽ
\__L 彡 ヽ ',
フ / / / / , ヽ ', j
レ / / / ', ヽ j
// ! /_l_/__ノ { \} ', ',/
... | [["+", 49, 50, 51, 2, 3, 4, 0, 2, 63, 22], ["+", 51, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 51, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 2,177 |
#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) { return (x % y) ? gcd(y, x % y) : y; }
const long long MOD = 1000000007;
int main() {
int N;
cin >> N;
vector<long long> pw(200010);
pw[0] = 1;
for (int i = 1; i < 200010; ++i)
pw[i] = (pw[i - 1] * 2) % MOD;
map... | #include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) { return (y) ? gcd(y, x % y) : x; }
const long long MOD = 1000000007;
int main() {
int N;
cin >> N;
vector<long long> pw(200010);
pw[0] = 1;
for (int i = 1; i < 200010; ++i)
pw[i] = (pw[i - 1] * 2) % MOD;
map<pai... | [["-", 0, 37, 0, 41, 15, 23, 0, 16, 31, 22], ["-", 0, 37, 0, 41, 15, 23, 0, 16, 17, 109], ["-", 0, 14, 8, 9, 0, 37, 0, 41, 75, 22], ["+", 0, 14, 8, 9, 0, 37, 0, 41, 75, 22]] | 1 | 332 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
constexpr char newl = '\n';
// https://noshi91.hatenablog.com/entry/2019/03/31/174006
template <std::uint_fast64_t Modulus> struct ModInt {
using u64 = std::uint_fast64_t;
static constexpr u64 MOD = Modulus;
u64 val;... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
constexpr char newl = '\n';
// https://noshi91.hatenablog.com/entry/2019/03/31/174006
template <std::uint_fast64_t Modulus> struct ModInt {
using u64 = std::uint_fast64_t;
static constexpr u64 MOD = Modulus;
u64 val;... | [["+", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["+", 8, 9, 0, 57, 64, 9, 0, 116, 0, 35]] | 1 | 1,003 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define whole(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using P = pair<ll, ll>;
#define debug(var) cerr << "[" << #var <<... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define whole(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using P = pair<ll, ll>;
#define debug(var) cerr << "[" << #var <<... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 108], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 1,201 |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl... | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 110]] | 1 | 1,188 |
#include <cmath>
#include <iostream>
#include <map>
#include <vector>
const long long MOD = 1000000007;
long long gcd(long long a, long long b) {
long long r = a % b;
return r ? gcd(b, r) : b;
}
int main() {
int N;
std::cin >> N;
long long zero = 0;
std::vector<long long> A(N), B(N);
std::map<std::pai... | #include <cmath>
#include <iostream>
#include <map>
#include <vector>
const long long MOD = 1000000007;
long long gcd(long long a, long long b) {
long long r = a % b;
return r ? gcd(b, r) : b;
}
int main() {
int N;
std::cin >> N;
long long zero = 0;
std::vector<long long> A(N), B(N);
std::map<std::pai... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]] | 1 | 505 |
import sys
from collections import defaultdict
dic1 = defaultdict(int)
dic2 = defaultdict(int)
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0
mod = 10**9+7
def pow(n,p,mod=10**9+7): #繰り返し二乗法(nのp乗)
res = 1
while p > 0:
if p % 2 == 0:
n = n ** 2 % mod
p... | import sys
from collections import defaultdict
dic1 = defaultdict(int)
dic2 = defaultdict(int)
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0
mod = 10**9+7
def pow(n,p,mod=10**9+7): #繰り返し二乗法(nのp乗)
res = 1
while p > 0:
if p % 2 == 0:
n = n ** 2 % mod
p... | [["-", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22]] | 5 | 374 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll zero = 0;
const ll INF = 3000000000000000000; // 3*10^18
const ll MOD = 1000000007; // 10^9+7
const ll MOD2 = 998244353;
ll po(ll a, ll b) {
ll res = 1;
ll tmp = a;
while (b > 0) {
if (b % 2 == 1)
res = res * tmp % MO... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll zero = 0;
const ll INF = 3000000000000000000; // 3*10^18
const ll MOD = 1000000007; // 10^9+7
const ll MOD2 = 998244353;
ll po(ll a, ll b) {
ll res = 1;
ll tmp = a;
while (b > 0) {
if (b % 2 == 1)
res = res * tmp % MO... | [["+", 0, 11, 12, 2, 3, 4, 0, 2, 63, 22], ["+", 12, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 12, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 815 |
#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> llP;
ll mod(ll a, ll b) {
ll ret = a % b;
if (ret < 0)
ret += b;
return ret;
}
ll modpow(ll a, ll b, ll c) {
ll res = 1;
while (b > 0) {
if (b & 1)
res = mod(r... | #include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> llP;
ll mod(ll a, ll b) {
ll ret = a % b;
if (ret < 0)
ret += b;
return ret;
}
ll modpow(ll a, ll b, ll c) {
ll res = 1;
while (b > 0) {
if (b & 1)
res = mod(r... | [["-", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 7, 10, 43, 39, 86, 0, 87], ["+", 0, 7, 15, 16, 12, 16, 31, 74, 0, 24], ["+", 15, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 7, 15, 16, 12, 16, 31, 74, 0, 25]] | 1 | 834 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 1000000007;
constexpr ll mod998 = 998244353;
int N;
ll A[200000], B[200000], res;
map<pair<ll, ll>, ll> mp;
ll pw(ll x, ll y) {
ll a = 1;
while (y) {
if (y & 1) {
a = a * x % mod;
}
x = x * x % mod;
y /= 2... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 1000000007;
constexpr ll mod998 = 998244353;
int N;
ll A[200000], B[200000], res;
map<pair<ll, ll>, ll> mp;
ll pw(ll x, ll y) {
ll a = 1;
while (y) {
if (y & 1) {
a = a * x % mod;
}
x = x * x % mod;
y /= 2... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 528 |
import math
mod = 10**9 + 7
n = int(input())
d = {}
d0 = 0
for _ in range(n):
a, b = map(int, input().split())
g = math.gcd(a, b)
if g == 0:
d0 += 1
else:
a //= g
b //= g
if a < 0:
a = -a
b = -b
elif a == 0 and b < 0:
b = -b
... | import math
mod = 10**9 + 7
n = int(input())
d = {}
d0 = 0
for _ in range(n):
a, b = map(int, input().split())
g = math.gcd(a, b)
if g == 0:
d0 += 1
else:
a //= g
b //= g
if a < 0:
a = -a
b = -b
elif a == 0 and b < 0:
b = -b
... | [["-", 0, 57, 64, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 57, 64, 196, 0, 57, 15, 666, 667, 19]] | 5 | 238 |
// Copyright © 2020 Diego Garcia Rodriguez del Campo. All rights reserved.
#include <bits/stdc++.h>
#define MAX 200005
#define optimiza_io \
cin.tie(0); \
ios_base::sync_with_stdio(0);
#defin... | // Copyright © 2020 Diego Garcia Rodriguez del Campo. All rights reserved.
#include <bits/stdc++.h>
#define MAX 200005
#define optimiza_io \
cin.tie(0); \
ios_base::sync_with_stdio(0);
#defin... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32]] | 1 | 578 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pll = pair<ll, ll>;
constexpr ll MOD = 1000000007;
ll modpow(ll a, ll n) {
ll ret = 1;
while (n > 0) {
if (n & 1)
ret = ret * a % MOD;
a = a * a % MOD;
n >>= 1;
}
return ret;
}
int main() {
int N;
cin >> N;
map<... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pll = pair<ll, ll>;
constexpr ll MOD = 1000000007;
ll modpow(ll a, ll n) {
ll ret = 1;
while (n > 0) {
if (n & 1)
ret = ret * a % MOD;
a = a * a % MOD;
n >>= 1;
}
return ret;
}
int main() {
int N;
cin >> N;
map<... | [["-", 28, 118, 28, 69, 341, 342, 0, 83, 0, 13], ["-", 28, 118, 28, 69, 341, 342, 0, 83, 0, 21], ["+", 28, 118, 28, 69, 341, 342, 0, 83, 0, 21], ["+", 28, 118, 28, 69, 341, 342, 0, 83, 0, 13], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 326 |
#include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
const long long MOD = 1000000007;
long long A[200000];
long long B[200000];
pair<lon... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
const long long MOD = 1000000007;
long long A[200000];
long long B[200000];
pair<lon... | [["+", 0, 37, 0, 2, 3, 4, 0, 91, 17, 33], ["+", 12, 16, 31, 23, 0, 16, 12, 74, 0, 24], ["+", 0, 16, 12, 74, 39, 77, 39, 86, 0, 96], ["+", 12, 16, 31, 23, 0, 16, 12, 74, 0, 25]] | 1 | 882 |
from collections import Counter
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**9)
def solve():
MOD = 10**9 + 7
N = int(input())
ABs = [tuple(map(int, input().split())) for _ in range(N)]
def gcd(a, b):
while b:
a, b = b, a%b
return a
cntPos = Counter(... | from collections import Counter
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**9)
def solve():
MOD = 10**9 + 7
N = int(input())
ABs = [tuple(map(int, input().split())) for _ in range(N)]
def gcd(a, b):
while b:
a, b = b, a%b
return a
cntPos = Counter(... | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 505 |
#pragma region head
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repp(i, a, b) for (int i = a; i <= (b); ++i)
#define repr(i, a, b) for (int i = a; ... | #pragma region head
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repp(i, a, b) for (int i = a; i <= (b); ++i)
#define repr(i, a, b) for (int i = a; ... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 1,124 |
def main():
from math import gcd
n = int(input())
ab = [list(map(int, input().split())) for _ in [0]*n]
adb = dict()
ans = 0
mod = 10**9+7
for a, b in ab:
if a == b == 0:
ans += 1
continue
if b != 0:
g = gcd(a, b)
a = a//g
... | def main():
from math import gcd
n = int(input())
ab = [list(map(int, input().split())) for _ in [0]*n]
adb = dict()
ans = 0
mod = 10**9+7
for a, b in ab:
if a == b == 0:
ans += 1
continue
if b != 0:
g = gcd(a, b)
a = a//g
... | [["-", 0, 57, 75, 665, 15, 666, 0, 660, 0, 612], ["-", 0, 57, 75, 665, 15, 666, 0, 660, 0, 21], ["+", 0, 57, 75, 665, 15, 666, 0, 660, 0, 21], ["+", 0, 57, 75, 665, 15, 666, 0, 660, 0, 612]] | 5 | 327 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
#define fi first
#define se second
const ll inf = 1e18;
const ld pi = acos(-1.0);
const int N = 3e5 + 6;
const int M = 1e9 + 7;
map<pair<ll, ll>, int> mp;
ll po(ll a, ll b) {
if (b == 0)
return 1;
ll... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
#define fi first
#define se second
const ll inf = 1e18;
const ld pi = acos(-1.0);
const int N = 3e5 + 6;
const int M = 1e9 + 7;
map<pair<ll, ll>, int> mp;
ll po(ll a, ll b) {
if (b == 0)
return 1;
ll... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22]] | 1 | 426 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// マクロ
// forループ
#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 (ll i = (a); i <= (ll)(b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (ll)(b); i--)
// xにはvectorなどのコン... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// マクロ
// forループ
#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 (ll i = (a); i <= (ll)(b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (ll)(b); i--)
// xにはvectorなどのコン... | [["-", 8, 9, 0, 57, 64, 1, 0, 27, 17, 29], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 107], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 22]] | 1 | 596 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rep2(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
c... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rep2(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
c... | [["-", 12, 118, 28, 23, 0, 16, 12, 23, 0, 24], ["-", 28, 23, 0, 16, 12, 23, 0, 16, 17, 47], ["-", 28, 23, 0, 16, 12, 23, 0, 16, 12, 13], ["-", 12, 118, 28, 23, 0, 16, 12, 23, 0, 25]] | 1 | 719 |
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using PII = pair<int, int>;
using PLI = pair<long long, int>;
using PLL = pair<long long, long long>;
template <class A, class B>
ostream &operator<<(ostream &out, const pair<A, B> &p) {
return out << "(" << p.first << ", " << p.second << ")";
}
temp... | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
using PII = pair<int, int>;
using PLI = pair<long long, int>;
using PLL = pair<long long, long long>;
template <class A, class B>
ostream &operator<<(ostream &out, const pair<A, B> &p) {
return out << "(" << p.first << ", " << p.second << ")";
}
temp... | [["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 1,705 |
#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x, to) for (x = 0; x < (to); x++)
#define FORR(x, arr) for (auto &x : arr)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define ALL(a) (a.begin()), ... | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x, to) for (x = 0; x < (to); x++)
#define FORR(x, arr) for (auto &x : arr)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define ALL(a) (a.begin()), ... | [["+", 49, 50, 51, 2, 3, 4, 0, 2, 63, 22], ["+", 51, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 51, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 527 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
const int INF = 0x3f3f3f3f;
const ll INFL = 0x3f3f3f3f3f3f3f3f;
ll ppow(ll a, ll b) {
a %= MOD;
ll res = 1;
while (b) {
if (b & 1)
res... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
const int INF = 0x3f3f3f3f;
const ll INFL = 0x3f3f3f3f3f3f3f3f;
ll ppow(ll a, ll b) {
a %= MOD;
ll res = 1;
while (b) {
if (b & 1)
res... | [["+", 12, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["-", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["-", 31, 16, 12, 16, 31, 16, 12, 23, 0, 24], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 402 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#include <boost/multiprecision/cpp_ll.hpp>
// typedef boost::multiprecision::cpp_ll ll;
typedef long double dd;
#define i_7 (ll)(1E9 + 7)
//#define i_7 998244353
#define i_5 i_7 - 2
ll mod(ll a) {
ll c = a % i_7;
if (c >= 0)
return c;
retur... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#include <boost/multiprecision/cpp_ll.hpp>
// typedef boost::multiprecision::cpp_ll ll;
typedef long double dd;
#define i_7 (ll)(1E9 + 7)
//#define i_7 998244353
#define i_5 i_7 - 2
ll mod(ll a) {
ll c = a % i_7;
if (c >= 0)
return c;
retur... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 17, 29], ["+", 0, 1, 0, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]] | 1 | 959 |
#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 ll long long
#define hii cout << "hii" << endl
#define int ll
#define endl '\n'
#define all(s) s.begin(), s.end()
template <class T> ostream &operator<<(ostre... | #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 ll long long
#define hii cout << "hii" << endl
#define int ll
#define endl '\n'
#define all(s) s.begin(), s.end()
template <class T> ostream &operator<<(ostre... | [["-", 0, 1, 0, 11, 12, 23, 0, 16, 17, 72], ["-", 0, 1, 0, 11, 12, 23, 0, 16, 12, 13]] | 1 | 1,130 |
#include <bits/stdc++.h>
#define int long long
#define fi first
#define se second
#define pii pair<int, int>
#define mp make_pair
using namespace std;
const int N = 2e5 + 5;
const int mod = 1000000007;
int n, a[N], b[N], pw[N], zero1, zero2;
map<pii, int> cnt;
main() {
ios_base::sync_with_stdio(false);
cin.tie(n... | #include <bits/stdc++.h>
#define int long long
#define fi first
#define se second
#define pii pair<int, int>
#define mp make_pair
using namespace std;
const int N = 2e5 + 5;
const int mod = 1000000007;
int n, a[N], b[N], pw[N], zero1, zero2;
map<pii, int> cnt;
main() {
ios_base::sync_with_stdio(false);
cin.tie(n... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 147], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32], ["-", 8, 9, 0, 57, 64, 1, 0, 11, 12, 146], ["+", 8, 9, 0, 57, 64, 1, 0, 27, 17, 29]] | 1 | 452 |
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
/*
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp> // Including
tree_order_statistics_node_update using namespace __gnu_pbds;
typedef tree<
int,
null_type,
le... | #include <bits/stdc++.h>
#include <cassert>
using namespace std;
/*
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp> // Including
tree_order_statistics_node_update using namespace __gnu_pbds;
typedef tree<
int,
null_type,
le... | [["-", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 677 |
#include <bits/stdc++.h>
using namespace std;
#define reg register
#define ll long long
#define maxn 300005
#define mo 1000000007
#define int ll
inline ll read() {
ll x = 0, w = 0;
char ch = getchar();
while (!isdigit(ch))
w |= ch == '-', ch = getchar();
while (isdigit(ch))
x = (x << 3) + (x << 1) + (ch... | #include <bits/stdc++.h>
using namespace std;
#define reg register
#define ll long long
#define maxn 300005
#define mo 1000000007
#define int ll
inline ll read() {
ll x = 0, w = 0;
char ch = getchar();
while (!isdigit(ch))
w |= ch == '-', ch = getchar();
while (isdigit(ch))
x = (x << 3) + (x << 1) + (ch... | [["-", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22]] | 1 | 721 |
#include <bits/stdc++.h>
using namespace std;
// T+N
//#pragma GCC optimize ("O3")
//#pragma GCC target ("sse4")
#define endl "\n"
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
template <class T, class T2> inline bool chkmax(T &x, const T2 &y) {
return x < y ? x = y, 1 : 0;
}
template ... | #include <bits/stdc++.h>
using namespace std;
// T+N
//#pragma GCC optimize ("O3")
//#pragma GCC target ("sse4")
#define endl "\n"
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
template <class T, class T2> inline bool chkmax(T &x, const T2 &y) {
return x < y ? x = y, 1 : 0;
}
template ... | [["-", 28, 69, 341, 342, 0, 69, 341, 342, 0, 22], ["+", 341, 342, 0, 69, 341, 342, 0, 16, 31, 22], ["+", 341, 342, 0, 69, 341, 342, 0, 16, 17, 33], ["+", 341, 342, 0, 69, 341, 342, 0, 16, 12, 13]] | 1 | 836 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
class ModInt {
public:
ModInt() { x = 0; }
ModInt(int v) { x = (((v % mod) + mod) % mod); }
ModInt(long long v) { x = (((v % mod) + mod) % mod); }
ModInt(unsigned long long v) { x = (((v % mod) + mod) % mod); }... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
class ModInt {
public:
ModInt() { x = 0; }
ModInt(int v) { x = (((v % mod) + mod) % mod); }
ModInt(long long v) { x = (((v % mod) + mod) % mod); }
ModInt(unsigned long long v) { x = (((v % mod) + mod) % mod); }... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 1,094 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define all(a) (a).begin(), (a).end()
typedef long long ll;
#define rep1(i, n) for (int i = 1; i <= int(n); ++i)
class modint {
public:
using ll = long long;
ll num;
static const ll MOD = 1e9 + 7;
static vector<mod... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define all(a) (a).begin(), (a).end()
typedef long long ll;
#define rep1(i, n) for (int i = 1; i <= int(n); ++i)
class modint {
public:
using ll = long long;
ll num;
static const ll MOD = 1e9 + 7;
static vector<mod... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 16, 31, 16, 12, 16, 12, 2, 63, 22], ["+", 31, 16, 12, 16, 12, 2, 3, 4, 0, 24], ["+", 31, 16, 12, 16, 12, 2, 3, 4, 0, 22], ["+", 31, 16, 12, 16, 12, 2, 3, 4, 0, 25]] | 1 | 967 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define p_ary(ary, a, b) \
do { \
cout << "["; ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define p_ary(ary, a, b) \
do { \
cout << "["; ... | [["-", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 27, 17, 68], ["-", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]] | 1 | 688 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
const int N = 2e5 + 5;
int t;
int n;
long long a[N], b[N];
long long powers[N];
const long long mod = 1e9 + 7;
map<pair<int, int>, long long> cnt;
map<pair<int, int>, bool> ok;
long long gcd(long long a, long long b) {
if (b ==... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
const int N = 2e5 + 5;
int t;
int n;
long long a[N], b[N];
long long powers[N];
const long long mod = 1e9 + 7;
map<pair<int, int>, long long> cnt;
map<pair<int, int>, bool> ok;
long long gcd(long long a, long long b) {
if (b ==... | [["-", 0, 27, 28, 69, 341, 342, 0, 83, 0, 13], ["-", 0, 27, 28, 69, 341, 342, 0, 83, 0, 21], ["+", 0, 27, 28, 69, 341, 342, 0, 83, 0, 21], ["+", 0, 27, 28, 69, 341, 342, 0, 83, 0, 13]] | 1 | 620 |
#pragma GCC optimize("O3")
// #pragma GCC target ("avx")
#include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#ifdef LOCAL
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
#define NDEBUG
#define eprintf(...) ... | #pragma GCC optimize("O3")
// #pragma GCC target ("avx")
#include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#ifdef LOCAL
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
#define NDEBUG
#define eprintf(...) ... | [["-", 0, 43, 49, 50, 51, 16, 12, 69, 28, 22], ["+", 0, 43, 49, 50, 51, 16, 12, 69, 28, 22]] | 1 | 1,229 |
#include <algorithm> //sort(a.begin(), a.end());reverse(a.begin(), a.end());
#include <bits/stdc++.h>
#include <ctime> //実行時間を測る
#include <iostream>
#include <math.h> //pow(x,y)=x^y 99999とかの場合+1するif文
#define ll long long
#define vecvec(h, w, name) vector<vector<ll>> name(h, vector<ll>(w));
#define rep(init, i, n) for (... | #include <algorithm> //sort(a.begin(), a.end());reverse(a.begin(), a.end());
#include <bits/stdc++.h>
#include <ctime> //実行時間を測る
#include <iostream>
#include <math.h> //pow(x,y)=x^y 99999とかの場合+1するif文
#define ll long long
#define vecvec(h, w, name) vector<vector<ll>> name(h, vector<ll>(w));
#define rep(init, i, n) for (... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 15, 339, 51, 16, 12, 2, 63, 118, 28, 22], ["+", 15, 339, 51, 16, 12, 2, 63, 118, 28, 22]] | 1 | 652 |
n = input()
s = input()
if n == s[-1] and len(n) == len(s)-1:
print('Yes')
else :
print('No') | n = input()
s = input()
if n == s[:-1] and len(n) == len(s)-1:
print('Yes')
else :
print('No') | [["+", 15, 679, 31, 666, 0, 206, 206, 663, 0, 102]] | 5 | 45 |
#include <iostream>
using namespace std;
int main() {
int c = 0;
string s, t;
cin >> s >> t;
for (int i = 0; i < s.size(); i++) {
if (s[i] != t[i]) {
c++;
}
}
if (c == 1) {
cout << "No";
} else {
cout << "Yes";
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int c = 0;
string s, t;
cin >> s >> t;
for (int i = 0; i < s.size(); i++) {
if (s[i] != t[i]) {
c++;
}
}
if (c >= 1) {
cout << "No";
} else {
cout << "Yes";
}
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 91 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); ++i)
#define all(a) (a).begin(), (a).end()
int main() {
string s, t;
cin >> s >> t;
cout << (s == t.substr(s.size()) ? "Yes" : "No") << '\n';
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); ++i)
#define all(a) (a).begin(), (a).end()
int main() {
string s, t;
cin >> s >> t;
cout << (s == t.substr(0, s.size()) ? "Yes" : "No") << '\n';... | [["+", 0, 41, 15, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 41, 15, 16, 12, 2, 3, 4, 0, 21]] | 1 | 84 |
S = input()
T = input()
result = False
if all([s >= 'a' and s <= 'z' for s in S]):
if all([t >= 'a' and t <= 'z' for t in T]):
if len(S) >= 1 and len(S) <= 10:
if len(T) == len(S) + 1:
result = S.startswith(T)
if result:
print('Yes')
else:
print('No') | S = input()
T = input()
result = False
if all([s >= 'a' and s <= 'z' for s in S]):
if all([t >= 'a' and t <= 'z' for t in T]):
if len(S) >= 1 and len(S) <= 10:
if len(T) == len(S) + 1:
result = T.startswith(S)
if result:
print('Yes')
else:
print('No') | [["-", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22]] | 5 | 110 |
#include <bits/stdc++.h>
using namespace std;
char s1[100], s2[100];
int main() {
scanf("%s %s", s1, s2);
bool sw = 1;
for (int i = 0; i < strlen(s1); i++)
sw &= s1[i] == s2[i];
if (sw)
printf("YES\n");
else
printf("NO\n");
return 0;
} | #include <bits/stdc++.h>
using namespace std;
char s1[100], s2[100];
int main() {
scanf("%s %s", s1, s2);
bool sw = 1;
for (int i = 0; i < strlen(s1); i++)
sw &= s1[i] == s2[i];
if (sw)
printf("Yes\n");
else
printf("No\n");
return 0;
} | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 92 |
#include <iostream>
using namespace std;
string S, T;
void input() { cin >> S >> T; }
void solve() {
T.pop_back();
if (S == T)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
int main() {
void input();
void solve();
return 0;
}
| #include <iostream>
using namespace std;
string S, T;
void input() { cin >> S >> T; }
void solve() {
T.pop_back();
if (S == T)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
int main() {
input();
solve();
return 0;
}
| [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 77 |
S=str(input())
B=str(input())
if S[:-1:]==B:
print('Yes')
else:
print('No') | S=str(input())
B=str(input())
if B[:-1:]==S:
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 57, 15, 666, 0, 206, 51, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 206, 51, 22], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22]] | 5 | 41 |
package main
import (
"fmt"
"unicode/utf8"
)
func main() {
var s, t string
_, _ = fmt.Scanf("%s", &s)
_, _ = fmt.Scanf("%t", &t)
fmt.Println(answer167A(s, t))
}
func answer167A(s string, t string) string {
tLength := utf8.RuneCountInString(t)
if t[:tLength-1] == s {
return "Yes"
}
return "No"
}
| package main
import (
"fmt"
"unicode/utf8"
)
func main() {
var s, t string
_, _ = fmt.Scanf("%s", &s)
_, _ = fmt.Scanf("%s", &t)
fmt.Println(answer167A(s, t))
}
func answer167A(s string, t string) string {
tLength := utf8.RuneCountInString(t)
if t[:tLength-1] == s {
return "Yes"
}
return "No"
}
| [] | 7 | 117 |
s,t=$<.map &:chop
t.chop
puts s==t ? :Yes: :No | s,t=$<.map &:chop
t.chop!
puts s==t ? :Yes: :No | [["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]] | 4 | 20 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <time.h>
#include <vector>
typed... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <time.h>
#include <vector>
typed... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 104 |
#include <bits/stdc++.h>
#define ep emplace_back
#define pb push_back
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pil pair<int, ll>
#define pli pair<ll, int>
typedef long long ll;
using namespace std;
int main() {
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(false);
string s, t;
cin >> s >... | #include <bits/stdc++.h>
#define ep emplace_back
#define pb push_back
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pil pair<int, ll>
#define pli pair<ll, int>
typedef long long ll;
using namespace std;
int main() {
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(false);
string s, t;
cin >> s >... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 102 |
S = input()
T = input()
if T.startwith('S'):
print("Yes")
else:
print("No")
| S = input()
T = input()
if T.startswith(S):
print("Yes")
else:
print("No")
| [["-", 0, 656, 0, 57, 15, 652, 63, 319, 319, 22], ["+", 0, 656, 0, 57, 15, 652, 63, 319, 319, 22], ["-", 0, 57, 15, 652, 3, 4, 0, 557, 0, 654], ["-", 0, 57, 15, 652, 3, 4, 0, 557, 0, 655]] | 5 | 34 |
s = gets.chomp.split("").map(&:to_s)
t = gets.split("").map(&:to_s)
if s.join + t[-1] == t.join
puts "Yes"
else
puts "No"
end | s = gets.chomp.split("").map(&:to_s)
t = gets.chomp.split("").map(&:to_s)
if s.join + t[-1] == t.join
puts "Yes"
else
puts "No"
end | [["+", 0, 662, 12, 652, 486, 652, 486, 652, 735, 22], ["+", 0, 493, 0, 662, 12, 652, 486, 652, 17, 131]] | 4 | 56 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int count = 0;
for (int i = 0; i < s.size(); i++) {
if (s.at(i) != t.at(i)) {
count++;
break;
}
}
if (count = 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int count = 0;
for (int i = 0; i < s.size(); i++) {
if (s.at(i) != t.at(i)) {
count++;
break;
}
}
if (count == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | [["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 98 |
s = input()
t = input()
for i in range(len(s)):
if s[i] != t[i]:
print("No")
print("Yes") | s = input()
t = input()
for i in range(len(s)):
if s[i] != t[i]:
print("No")
exit()
print("Yes") | [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 44 |
bef = str(input())
aft = str(input())
print(("No","Yes")[len(aft[0:len(bef)].strip(bef) + aft[len(bef):]) == 1]) | bef = str(input())
aft = str(input())
print(("No","Yes")[len(aft[0:len(bef)].replace(bef,"") + aft[len(bef):]) == 1]) | [["-", 3, 4, 0, 657, 31, 652, 63, 319, 319, 22], ["+", 3, 4, 0, 657, 31, 652, 63, 319, 319, 22], ["+", 3, 4, 0, 657, 31, 652, 3, 4, 0, 21], ["+", 0, 657, 31, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 657, 31, 652, 3, 4, 0, 557, 0, 655]] | 5 | 58 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
for (int i = 0; i < a.size(); i++) {
if (a[i] != b[i]) {
cout << "no";
return 0;
}
}
cout << "yes";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
for (int i = 0; i < a.size(); i++) {
if (a[i] != b[i]) {
cout << "No";
return 0;
}
}
cout << "Yes";
return 0;
}
| [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 75 |
s,t = input().split()
o = t[:-1]
if ( o == s ):
print('Yes')
else:
print('No') | s = input()
t = input()
o = t[:-1]
if ( o == s ):
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 40 |
S = input()
T = input()
if S[0:len(T) - 1] == S:
print("Yes")
else:
print("No") | S = input()
T = input()
if T[0:len(T) - 1] == S:
print("Yes")
else:
print("No") | [["-", 0, 656, 0, 57, 15, 666, 0, 206, 51, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 206, 51, 22]] | 5 | 39 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
if (s == t.substr(0, s.length() + 1)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
if (s == t.substr(0, s.length())) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| [["-", 51, 16, 12, 2, 3, 4, 0, 16, 17, 72], ["-", 51, 16, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 65 |
a=input()
b=input()
c=0
if (len(a)+1)!=len(b):
print("No")
else:
for i in range(len(b)):
if a[i]==b[i]:
c=c+1
if c==len(a):
print("Yes")
else:
print("No") | a=input()
b=input()
c=0
if (len(a)+1)!=len(b):
print("No")
else:
for i in range(len(a)):
if a[i]==b[i]:
c=c+1
if c==len(a):
print("Yes")
else:
print("No") | [["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 85 |
#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 < (n); ++i)
const string YES = "Yes";
const string NO = "No";
void solve(std::string S, std::string T) {
bool isOk = true;
rep(i, S.size() - 1) {
if (S[i] != T[i])
isOk = fa... | #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 < (n); ++i)
const string YES = "Yes";
const string NO = "No";
void solve(std::string S, std::string T) {
bool isOk = true;
rep(i, T.size() - 1) {
if (S[i] != T[i])
isOk = fa... | [["-", 3, 4, 0, 16, 31, 2, 63, 118, 28, 22], ["+", 3, 4, 0, 16, 31, 2, 63, 118, 28, 22]] | 1 | 152 |
<?php
# 入力部
// fscanf(STDIN, "%d", $a);
// fscanf(STDIN, "%d %d", $a, $b);
// $s1 = fgets(STDIN); //"\n"の2文字
// $s2 = fgets(STDIN);
// fscanf(STDIN, "%d", $n);
fscanf(STDIN, "%s", $s1);
fscanf(STDIN, "%s", $s2);
# 処理部
$arr1 = str_split($s1);
$arr2 = str_split($s2);
// $arr1 = explode("", $s1);
// $arr2 = explode("", $... | <?php
# 入力部
// fscanf(STDIN, "%d", $a);
// fscanf(STDIN, "%d %d", $a, $b);
// $s1 = fgets(STDIN); //"\n"の2文字
// $s2 = fgets(STDIN);
// fscanf(STDIN, "%d", $n);
fscanf(STDIN, "%s", $s1);
fscanf(STDIN, "%s", $s2);
# 処理部
$arr1 = str_split($s1);
$arr2 = str_split($s2);
// $arr1 = explode(" ", $s1);
// $arr2 = explode(" ",... | [["-", 0, 7, 0, 16, 12, 16, 31, 613, 63, 141], ["+", 0, 493, 0, 7, 0, 16, 12, 613, 63, 141], ["-", 31, 613, 3, 3, 0, 28, 0, 606, 0, 141], ["+", 12, 613, 3, 3, 0, 28, 0, 606, 0, 141], ["-", 0, 493, 0, 7, 0, 16, 12, 16, 17, 33], ["-", 0, 493, 0, 7, 0, 16, 12, 16, 12, 612]] | 6 | 154 |
s = input()
t = input()
ans = "Yes"
for i in range(len(s) - 1):
if s[i] == t[i]:
continue
else:
ans = "No"
if ans == "Yes" and (len(s)+1) == len(t):
ans = "Yes"
else:
ans = "No"
print(ans) | s = input()
t = input()
ans = "Yes"
for i in range(len(s)):
if s[i] == t[i]:
continue
else:
ans = "No"
if ans == "Yes" and (len(s)+1) == len(t):
ans = "Yes"
else:
ans = "No"
print(ans) | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 84 |
S=input()
T=input()
S=list(S)
T=list(T)
b=0
for i in range(0,len(S)):
if S[i]==T[i]:
b+=1
if len(T)==len(S)+1 and b!=0:
print("Yes")
else:
print("No") | S=input()
T=input()
S=list(S)
T=list(T)
b=0
for i in range(0,len(S)):
if not S[i]==T[i]:
b+=1
if len(T)==len(S)+1 and b==0:
print("Yes")
else:
print("No") | [["+", 0, 7, 8, 196, 0, 57, 15, 681, 0, 372], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 79], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 60]] | 5 | 83 |
s = input()
t = input()
flag = True
for i in range(s):
if s[i] is not t[i]:
flag = False
if flag is True:
print("Yes")
else:
print("No")
| s = input()
t = input()
flag = True
for i in range(len(s)):
if s[i] is not t[i]:
flag = False
if flag is True:
print("Yes")
else:
print("No") | [["+", 0, 7, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 55 |
s = input()
t = input()
if t.startswich(s):
print('Yes')
else:
print('No')
| s = input()
t = input()
if t.startswith(s):
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 57, 15, 652, 63, 319, 319, 22], ["+", 0, 656, 0, 57, 15, 652, 63, 319, 319, 22]] | 5 | 32 |
#include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define invrep(i, n) for (int i = (int)(n); i > 0; i++)
using ll = long long;
int main() {
string s, t;
cin >> s;
cin >> t;
string j = "";
... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define invrep(i, n) for (int i = (int)(n); i > 0; i++)
using ll = long long;
int main() {
string s, t;
cin >> s;
cin >> t;
string j = "";
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 104 |
#include <iostream>
#include <string.h>
using namespace std;
int main() {
int count = 0;
string S;
string T;
cin >> S;
cin >> T;
for (int i = 0; i < S.length(); i++) {
if (S[i] == T[i]) {
count++;
}
}
if (count == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <iostream>
#include <string.h>
using namespace std;
int main() {
int count = 0;
string S;
string T;
cin >> S;
cin >> T;
for (int i = 0; i < S.length(); i++) {
if (S[i] != T[i]) {
count++;
}
}
if (count == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 97 |
a = input()
b = input()
b.pop()
if a == b[:-1]:
print('Yes')
else:
print('No')
| a = input()
b = input()
if a == b[:-1]:
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22], ["-", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131], ["-", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 39 |
def main():
s = input()
t = input()
t_ = s[:len(t)]
if s == t_:
print('Yes')
else:
print('No')
if __name__ == "__main__":
main()
|
def main():
s = input()
t = input()
t_ = t[:len(t)-1]
if s == t_:
print('Yes')
else:
print('No')
if __name__ == "__main__":
main()
| [["-", 8, 196, 0, 1, 0, 662, 12, 206, 51, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 206, 51, 22], ["+", 0, 662, 12, 206, 206, 663, 0, 657, 17, 33], ["+", 0, 662, 12, 206, 206, 663, 0, 657, 12, 612]] | 5 | 54 |
s = str(input())
T = str(input())
t_before = ''
for i in range(len(s)):
t_before += t[i]
if s == t_before:
print('Yes')
else:
print('No') | s = str(input())
t = str(input())
t_before = ''
for i in range(len(s)):
t_before += t[i]
if s == t_before:
print('Yes')
else:
print('No') | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]] | 5 | 56 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
for (int i = 0; i < T.size(); i++) {
if (S[i] != T[i]) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
for (int i = 0; i < T.size() - 1; i++) {
if (S[i] != T[i]) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
} | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 76 |
S=list(input())
T=list(input())
T=T.pop(len(T)-1)
if S == T:
print("Yes")
else:
print("No") | S=list(input())
T=list(input())
T.pop(len(T)-1)
if S == T:
print("Yes")
else:
print("No") | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22]] | 5 | 48 |
#include <stdio.h>
int main(void) {
char S[10000], T[10000];
scanf("%c", &S);
scanf("%c", &T);
for (int i = 0; S[i] != '\0'; i++) {
if (S[i] != T[i]) {
printf("No\n");
return 0;
}
}
printf("Yes\n");
return 0;
}
| #include <stdio.h>
int main(void) {
char S[11], T[12];
scanf("%s", &S);
scanf("%s", &T);
for (int i = 0; S[i] != '\0'; i++) {
if (S[i] != T[i]) {
printf("No\n");
return 0;
}
}
printf("Yes\n");
return 0;
}
| [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 97 |
S = input()
T = input()
if T[0:len(T)] == S:
print("Yes")
else:
print("No") | S = input()
T = input()
judge = T[0:len(S)]
if judge == S:
print("Yes")
else:
print("No") | [["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 121], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 206, 206, 663, 0, 652, 3, 4, 0, 22], ["+", 12, 206, 206, 663, 0, 652, 3, 4, 0, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 57, 0, 121], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22]] | 5 | 37 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
int flag = 0;
for (int i = 0; i < s1.size(); i++) {
if (s1[i] != s2[i])
flag = 1;
}
if (flag == 0)
cout << "No\n";
else
cout << "Yes\n";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
int flag = 0;
for (int i = 0; i < s1.size(); i++) {
if (s1[i] != s2[i])
flag = 1;
}
if (flag == 1)
cout << "No\n";
else
cout << "Yes\n";
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 88 |
#include <stdio.h>
#include <string.h>
int main(void) {
char a[11], b[11];
int k;
scanf("%s %s", a, b);
b[strlen(a)] = '\0';
if (strcmp(a, b) == 0)
puts("yes");
else
puts("No");
return 0;
}
| #include <stdio.h>
#include <string.h>
int main(void) {
char a[11], b[11];
int k;
scanf("%s %s", a, b);
b[strlen(a)] = '\0';
if (strcmp(a, b) == 0)
puts("Yes");
else
puts("No");
return 0;
}
| [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 77 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
bool flag = 1;
cin >> s >> t;
if (s.size() + 1 == t.size()) {
for (int i = 0; i < s.size(); i++) {
if (s[i] != t[i]) {
flag = 0;
break;
}
}
if (flag == 1)
cout << "YES";
else
cout << "... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
bool flag = 1;
cin >> s >> t;
if (s.size() + 1 == t.size()) {
for (int i = 0; i < s.size(); i++) {
if (s[i] != t[i]) {
flag = 0;
break;
}
}
if (flag == 1)
cout << "Yes";
else
cout << "... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 112 |
s=input()
print("Yes"if input()[:-1]else"No") | s=input()
print("Yes"if s==input()[:-1]else"No") | [["+", 0, 652, 3, 4, 0, 41, 0, 666, 0, 22], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 60]] | 5 | 24 |
#include <bits/stdc++.h>
using namespace std;
int main() {
char s[15], t[15];
cin >> s >> t;
int l = strlen(s);
int p = strlen(t), cnt = 0;
for (int i = 0; i < l; i++) {
if (s[i] == t[i]) {
cnt++;
}
}
if (cnt == l) {
if (l == p - 1) {
cout << "Yes" << endl;
}
} else
cout ... | /*#include<bits/stdc++.h>
using namespace std;
int main()
{
string s,t;
cin>>s>>t;
int cnt=0;
for(int i=0;i<s.size();i++)
{
if(s[i]!=t[i])
{
cnt=1;
break;
}
}
if(cnt==0)
{
cout<<"Yes"<<endl;
}
else
cout<<"NO"<<endl;
... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 117 |
#include <iostream>
using namespace std;
int main(void) {
string S, T;
cin >> S >> T;
int cnt = 0;
for (int i = 0; i < S.size(); i++) {
if (S[i] != T[i])
cnt++;
}
if (cnt > 1) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
}
| #include <iostream>
using namespace std;
int main(void) {
string S, T;
cin >> S >> T;
int cnt = 0;
for (int i = 0; i < S.size(); i++) {
if (S[i] != T[i])
cnt++;
}
if (cnt > 0) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 91 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
t = t.erase(t[t.size() - 1]);
if (s == t) {
cout << "Yes";
} else {
cout << "No";
}
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
t = t.erase(t.size() - 1);
if (s == t) {
cout << "Yes";
} else {
cout << "No";
}
return 0;
} | [["-", 12, 2, 3, 4, 0, 69, 341, 342, 0, 70], ["-", 341, 342, 0, 16, 31, 2, 63, 118, 28, 22], ["-", 12, 2, 3, 4, 0, 69, 341, 342, 0, 73]] | 1 | 69 |
import static java.lang.Character.isUpperCase;
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String str = in.next();
String sc = in.next();
int a = sc.length() - 1;
str = str + sc.charAt(a);
if (... |
import static java.lang.Character.isUpperCase;
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String str = in.next();
String sc = in.next();
int a = sc.length() - 1;
str = str + sc.charAt(a);
if (... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 128 |
a = [input() for i in range(2)]
s = a[0]
t = s[1]
if s == t[:-1]:
print('Yes')
else:
print('No') | a = [input() for i in range(2)]
s = a[0]
t = a[1]
if s == t[:-1]:
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 1, 0, 662, 12, 206, 51, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 206, 51, 22]] | 5 | 50 |
a = gets.chomp
b = gets.chomp
b.chop == a ? 'Yes' : 'No' | a = gets.chomp
b = gets.chomp
puts b.chop == a ? 'Yes' : 'No'
| [["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]] | 4 | 23 |
a = gets.chomp
b = gets.chomp
if b.include?(a) && b.length == a.length + 1
puts 'Yes'
else
puts 'No'
end
| a = gets.chomp
b = gets.chomp
if b.chop == a && b.length == a.length + 1
puts 'Yes'
else
puts 'No'
end
| [["-", 0, 493, 0, 121, 15, 738, 31, 652, 735, 22], ["-", 0, 121, 15, 738, 31, 652, 3, 4, 0, 24], ["+", 0, 121, 15, 738, 31, 738, 31, 652, 735, 22], ["+", 0, 493, 0, 121, 15, 738, 31, 738, 17, 60], ["-", 0, 121, 15, 738, 31, 652, 3, 4, 0, 25]] | 4 | 37 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
String T = sc.next();
String x = S.substring(0, S.length() - 1);
String y = T.substring(0, S.length() - 1);
if (x.equals(y)) {
System.out.println("... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
String T = sc.next();
String x = S.substring(0, S.length());
String y = T.substring(0, S.length());
if (x.equals(y)) {
System.out.println("Yes");
... | [["-", 49, 200, 51, 492, 3, 4, 0, 16, 17, 33], ["-", 49, 200, 51, 492, 3, 4, 0, 16, 12, 499]] | 3 | 125 |
#include <stdio.h>
#include <string.h>
int main() {
char s[11], t[11];
int i, len1, len2;
gets(s);
gets(t);
len1 = strlen(s);
len2 = strlen(t);
for (i = 0; i < len1; i++) {
if (s[i] != t[i]) {
printf("NO\n");
return 0;
}
}
if (t[len2 - 1] >= 97 && t[len2 - 1] <= 122 && len2 == (... | #include <stdio.h>
#include <string.h>
int main() {
char s[11], t[11];
int i, len1, len2;
gets(s);
gets(t);
len1 = strlen(s);
len2 = strlen(t);
for (i = 0; i < len1; i++) {
if (s[i] != t[i]) {
printf("No\n");
return 0;
}
}
if (t[len2 - 1] >= 97 && t[len2 - 1] <= 122 && len2 == (... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 140 |
#include <stdio.h>
#include <string.h>
int main() {
char kata1[15];
char kata2[16];
scanf("%s", kata1);
scanf("%s", kata2);
int str = strlen(kata1);
int a = 0, count = 0;
for (a = 0; a < str; a++) {
kata1[a] = kata2[a];
count++;
}
if (count == str) {
printf("Yes\n");
} else {
print... | #include <stdio.h>
#include <string.h>
int main() {
char kata1[15];
char kata2[16];
scanf("%s", kata1);
scanf("%s", kata2);
int str = strlen(kata1);
int a = 0, count = 0;
for (a = 0; a < str; a++) {
if (kata1[a] == kata2[a]) {
count++;
}
}
if (count == str) {
printf("Yes\n");
} el... | [["+", 8, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["+", 0, 7, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["+", 0, 7, 8, 9, 0, 57, 15, 339, 0, 25], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, ... | 1 | 114 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
if (s == t.erase(0, t.size() - 1)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
if (s == t.substr(0, t.size() - 1)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | [["-", 15, 339, 51, 16, 12, 2, 63, 118, 119, 120], ["+", 15, 339, 51, 16, 12, 2, 63, 118, 119, 120]] | 1 | 66 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.