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 | change_count int64 0 100 |
|---|---|---|---|---|---|
#include <iostream>
using namespace std;
int main() {
int H, R;
cin >> H >> R;
//各、太陽の位置の比較をする
if (H - R == 0)
cout << 0 << endl; //日の入り、日の出
else if (H - R > 0)
cout << 1 << endl; //昼間
else
cout << -1 << endl; //夜間
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int H, R;
cin >> H >> R;
//各、太陽の位置の比較をする
if (H + R == 0)
cout << 0 << endl; //日の入り、日の出
else if (H + R > 0)
cout << 1 << endl; //昼間
else
cout << -1 << endl; //夜間
return 0;
}
| [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72]] | 1 | 66 | 4 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
int main(void) {
int h, r;
cin >> h >> r;
if (r + h == 0)
cout << 0 << endl;
else if (h - r >= 0)
cout << 1 << endl;
else if (... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
int main(void) {
int h, r;
cin >> h >> r;
if (r + h == 0)
cout << 0 << endl;
else if (h + r >= 0)
cout << 1 << endl;
else if (... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72]] | 1 | 92 | 4 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
int h, r;
scanf("%d%d", &h, &r);
if (h > 0)
puts("1");
else if (-h == r)
puts("0");
else
puts("-1");
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
int h, r;
scanf("%d%d", &h, &r);
if (h + r > 0)
puts("1");
else if (h + r == 0)
puts("0");
else
puts("-1");
} | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 91, 17, 33], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 74 | 7 |
#include <iostream>
using namespace std;
int main() {
int n, r;
cin >> n >> r;
if (n + r == 0)
cout << 1 << endl;
else if (n + r > 0)
cout << 0 << endl;
else
cout << -1 << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n, r;
cin >> n >> r;
if (n + r == 0)
cout << 0 << endl;
else if (n + r > 0)
cout << 1 << endl;
else
cout << -1 << endl;
return 0;
} | [["-", 0, 57, 64, 1, 0, 16, 31, 16, 12, 13], ["+", 0, 57, 64, 1, 0, 16, 31, 16, 12, 13]] | 1 | 62 | 4 |
#include <stdio.h>
int main(void) {
int r, h, x;
scanf("%d %d", &h, &r);
if (r <= h)
printf("1\n");
else if (-r > h)
printf("-1\n");
else
printf("0\n");
return 0;
} | #include <stdio.h>
int main(void) {
int r, h, x;
scanf("%d %d", &h, &r);
if (-r == h)
printf("0\n");
else if (-r > h)
printf("-1\n");
else
printf("1\n");
return 0;
} | [["+", 0, 57, 15, 339, 51, 16, 31, 91, 17, 33], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 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 | 71 | 7 |
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <typeinfo>
#include <vector>
#define syos... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <typeinfo>
#include <vector>
#define syos... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]] | 1 | 317 | 2 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int h = 0, r = 0;
cin >> h >> r;
if (h + r == 0) {
cout << "0" << endl;
} else if (h - r >= 0) {
cout << "1" << endl;
} else {
cout << "-1" << endl;
}
return 0;
} | #include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int h = 0, r = 0;
cin >> h >> r;
if (h + r == 0) {
cout << "0" << endl;
} else if (h + r >= 0) {
cout << "1" << endl;
} else {
cout << "-1" << endl;
}
return 0;
} | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72]] | 1 | 81 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, a) for (int i = 0; i < a; i++)
#define mp make_pair
#define pb push_ba... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, a) for (int i = 0; i < a; i++)
#define mp make_pair
#define pb push_ba... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 102 | 6 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b;
if (-a == b)
c = 0;
else if (a > 0)
c = 1;
else
c = -1;
cout << c << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b;
if (-a == b)
c = 0;
else if (-a <= b || a > 0)
c = 1;
else
c = -1;
cout << c << endl;
return 0;
}
| [["+", 15, 339, 51, 16, 31, 16, 31, 91, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22]] | 1 | 61 | 5 |
#include <iostream>
using namespace std;
int main() {
int h, r;
cin >> h >> r;
if (h + r < 0)
cout << -1 << endl;
else if (h + r == 0)
cout << 0 << endl;
else if (h - r >= 0)
cout << 1 << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int h, r;
cin >> h >> r;
if (h + r < 0)
cout << -1 << endl;
else if (h + r == 0)
cout << 0 << endl;
else if (h + r > 0)
cout << 1 << endl;
return 0;
}
| [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 70 | 4 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int H, R;
cin >> H >> R;
if (R + H == 0)
cout << "0" << endl;
if (H + R < 0)
cout << "-1" << endl;
if (H - R > 0)
cout << "1" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int H, R;
cin >> H >> R;
if (R + H == 0)
cout << "0" << endl;
if (R + H < 0)
cout << "-1" << endl;
if (H + R > 0)
cout << "1" << endl;
return 0;
}
| [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33]] | 1 | 74 | 6 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int H, R;
cin >> H >> R;
if (H + R == 0)
cout << 0 << endl;
if (H + R < 0)
cout << 1 << endl;
if (H + R > 0)
cout << -1 << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int H, R;
cin >> H >> R;
if (H + R == 0)
cout << 0 << endl;
if (H + R > 0)
cout << 1 << endl;
if (H + R < 0)
cout << -1 << endl;
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 68 | 4 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int h, r;
cin >> h >> r;
if (h >= r)
cout << "1" << endl;
if (-h - r > 0)
cout << "-1" << endl;
if (h + r == 0)
cout << "0" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int h, r;
cin >> h >> r;
if (-h - r < 0)
cout << "1" << endl;
if (-h - r > 0)
cout << "-1" << endl;
if (h + r == 0)
cout << "0" << endl;
return 0;
}
| [["+", 15, 339, 51, 16, 31, 16, 31, 91, 17, 33], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 73 | 5 |
h, r = list(map(int, input().split()))
print(int((h+r)/abs(h+r)))
| h, r = list(map(int, input().split()))
print(int((h+r>0)-(h+r<0)))
| [["+", 3, 4, 0, 657, 31, 23, 0, 666, 667, 47], ["+", 3, 4, 0, 657, 31, 23, 0, 666, 0, 612], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 17, 85], ["-", 0, 652, 3, 4, 0, 657, 12, 652, 63, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 3, 4, 0, 657, 12, 23, 0, 666, 667, 18], ["+", 3, 4, 0, 657, 12, 23, 0, 666, 0, 612]] | 5 | 37 | 7 |
h, r = map(int, input().split())
if h + r < 0:print(-1)
else:print(0 if h == r else 1)
| h, r = map(int, input().split())
if h + r < 0:print(-1)
else:print(0 if h + r == 0 else 1)
| [["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 60], ["+", 3, 4, 0, 41, 0, 666, 0, 657, 17, 72], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 60], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 0, 612]] | 5 | 40 | 4 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int E = s.nextInt();
int Y = s.nextInt();
if (E == 0) {
if (Y <= 1911) {
System.out.print("M");
System.out.println(Y - 1867);
} else if (Y <= 1925) {... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int E = s.nextInt();
int Y = s.nextInt();
if (E == 0) {
if (Y <= 1911) {
System.out.print("M");
System.out.println(Y - 1867);
} else if (Y <= 1925) {... | [["-", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499]] | 3 | 252 | 2 |
#include <stdio.h>
int main() {
int e, y;
scanf("%d%d", &e, &y);
if (e == 0) {
if (y <= 1911) {
printf("M%d\n", y - 1867);
} else if (y <= 1925) {
printf("T%d\n", y - 1911);
} else if (y <= 1988) {
printf("S%d\n", y - 1925);
} else {
printf("H%d\n", y - 1988);
}
}
i... | #include <stdio.h>
int main() {
int e, y;
scanf("%d%d", &e, &y);
if (e == 0) {
if (y <= 1911) {
printf("M%d\n", y - 1867);
} else if (y <= 1925) {
printf("T%d\n", y - 1911);
} else if (y <= 1988) {
printf("S%d\n", y - 1925);
} else {
printf("H%d\n", y - 1988);
}
} els... | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 75, 76, 0, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95], ["+", 75, 76, 0, 57, 75, 76, 0, 9, 0, 46]] | 0 | 189 | 7 |
#include <iostream>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
switch (E) {
case 0:
if (Y > 1988)
cout << "H" << Y - 1988 << endl;
else if (Y > 1925)
cout << "S" << Y - 1925 << endl;
else if (Y > 1911)
cout << "T" << Y - 1911 << endl;
else
cout << "M" <<... | #include <iostream>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
switch (E) {
case 0:
if (Y > 1988)
cout << "H" << Y - 1988 << endl;
else if (Y > 1925)
cout << "S" << Y - 1925 << endl;
else if (Y > 1911)
cout << "T" << Y - 1911 << endl;
else
cout << "M" <<... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 158 | 4 |
#include <iostream>
using namespace std;
int main() {
int E, Y, AD;
int wareki[5] = {0, 1865, 1911, 1925, 1988};
cin >> E >> Y;
AD = Y + wareki[E];
if (E != 0)
cout << AD << endl;
else {
if (AD > wareki[4])
cout << "H" << Y - wareki[4] << endl;
else if (AD > wareki[3])
cout << "S" ... | #include <iostream>
using namespace std;
int main() {
int E, Y, AD;
int wareki[5] = {0, 1867, 1911, 1925, 1988};
cin >> E >> Y;
AD = Y + wareki[E];
if (E != 0)
cout << AD << endl;
else {
if (AD > wareki[4])
cout << "H" << Y - wareki[4] << endl;
else if (AD > wareki[3])
cout << "S" ... | [["-", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13]] | 1 | 160 | 2 |
#include <iostream>
using namespace std;
int main() {
int e, y;
cin >> e >> y;
if (e == 0) {
if (y < 1912)
cout << "M" << y - 1967;
else if (y < 1926)
cout << "T" << y - 1911;
else if (y < 1989)
cout << "S" << y - 1925;
else
cout << "H" << y - 1988;
cout << endl;
... | #include <iostream>
using namespace std;
int main() {
int e, y;
cin >> e >> y;
if (e == 0) {
if (y < 1912)
cout << "M" << y - 1867;
else if (y < 1926)
cout << "T" << y - 1911;
else if (y < 1989)
cout << "S" << y - 1925;
else
cout << "H" << y - 1988;
cout << endl;
... | [["-", 0, 57, 64, 1, 0, 16, 12, 16, 12, 13], ["+", 0, 57, 64, 1, 0, 16, 12, 16, 12, 13]] | 1 | 159 | 2 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
int main(void) {
int e, y;
cin >> y >> e;
if (y == 0) {
if (e <= 1911)
cout << 'M' << e - 1867 << endl;
else if (e <= 1925)
... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
int main(void) {
int e, y;
cin >> y >> e;
if (y == 0) {
if (e <= 1911)
cout << 'M' << e - 1867 << endl;
else if (e <= 1925)
... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13]] | 1 | 192 | 2 |
#include <bits/stdc++.h>
#define int long long
#define double long double
#define INF 1e18
using namespace std;
template <class T> inline bool chmin(T &a, T b) {
if (a > b)
a = b;
return a > b;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b)
a = b;
return a < b;
}
signed main() {
int E... | #include <bits/stdc++.h>
#define int long long
#define double long double
#define INF 1e18
using namespace std;
template <class T> inline bool chmin(T &a, T b) {
if (a > b)
a = b;
return a > b;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b)
a = b;
return a < b;
}
signed main() {
int E... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 213 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0 && 1868 <= Y && Y <= 1911) {
cout << "M" << Y - 1967 << endl;
} else if (E == 0 && Y >= 1912 && Y <= 1925) {
cout << "T" << Y - 1911 << endl;
} else if (E == 0 && Y >= 1926 && Y <= 1988) {
cout << "S... | #include <bits/stdc++.h>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0 && 1868 <= Y && Y <= 1911) {
cout << "M" << Y - 1867 << endl;
} else if (E == 0 && Y >= 1912 && Y <= 1925) {
cout << "T" << Y - 1911 << endl;
} else if (E == 0 && Y >= 1926 && Y <= 1988) {
cout << "S... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 209 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E = 0) {
if (1868 <= Y && Y <= 1911) {
cout << "M" << Y - 1867 << endl;
} else if (1912 <= Y && Y <= 1925) {
cout << "T" << Y - 1911 << endl;
} else if (1926 <= Y && Y <= 1988) {
cout << "S" << Y... | #include <bits/stdc++.h>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0) {
if (1868 <= Y && Y <= 1911) {
cout << "M" << Y - 1867 << endl;
} else if (1912 <= Y && Y <= 1925) {
cout << "T" << Y - 1911 << endl;
} else if (1926 <= Y && Y <= 1988) {
cout << "S" << ... | [["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13]] | 1 | 191 | 4 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0) {
if (Y <= 1911) {
cout << "M" << Y - 1867 << endl;
} else if (1912 <= Y && Y <= 1925) {
cout << "T" << Y - 1911 << endl;
} else if (1926 <= Y && Y <= 1988) {
cout << "S" << Y - 1925 <<... | #include <bits/stdc++.h>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0) {
if (Y <= 1911) {
cout << "M" << Y - 1867 << endl;
} else if (1912 <= Y && Y <= 1925) {
cout << "T" << Y - 1911 << endl;
} else if (1926 <= Y && Y <= 1988) {
cout << "S" << Y - 1925 <<... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 187 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int e, y, a, b, c;
cin >> e >> y;
if (e == 0) {
a = y - 1868;
if (a <= 43) {
cout << "M" << a << endl;
} else if (44 <= a && a <= 57) {
b = a - 43;
cout << "T" << b << endl;
} else if (58 <= a && a <= 120) {
b = a ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int e, y, a, b, c;
cin >> e >> y;
if (e == 0) {
a = y - 1868;
if (a <= 43) {
cout << "M" << a + 1 << endl;
} else if (44 <= a && a <= 57) {
b = a - 43;
cout << "T" << b << endl;
} else if (58 <= a && a <= 120) {
b ... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 216 | 2 |
// AOJ0337.cpp
#include <iostream>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
switch (E) {
case 0:
if (1868 <= Y && Y <= 1991) {
cout << 'M' << Y - 1867 << endl;
} else if (1912 <= Y && Y <= 1925) {
cout << 'T' << Y - 1911 << endl;
} else if (1926 <= Y && Y <= 1988) {
... | // AOJ0337.cpp
#include <iostream>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
switch (E) {
case 0:
if (1868 <= Y && Y <= 1911) {
cout << 'M' << Y - 1867 << endl;
} else if (1912 <= Y && Y <= 1925) {
cout << 'T' << Y - 1911 << endl;
} else if (1926 <= Y && Y <= 1988) {
... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 189 | 2 |
#include <iostream>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0) {
if (Y >= 1989)
cout << "H" << 28 - (2016 - Y) << endl;
else if (Y >= 1926)
cout << "S" << 63 - (1988 - Y) << endl;
else if (Y >= 1912)
cout << "T" << 14 - (1925 - Y) << endl;
else if (Y >... | #include <iostream>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0) {
if (Y >= 1989)
cout << "H" << 28 - (2016 - Y) << endl;
else if (Y >= 1926)
cout << "S" << 63 - (1988 - Y) << endl;
else if (Y >= 1912)
cout << "T" << 14 - (1925 - Y) << endl;
else if (Y >... | [["-", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 185 | 8 |
#include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
int e, y;
cin >> e >> y;
if (e == 0) {
if (1868 <= y && y <= 1911)
cout << 'M' << y - 1868 << endl;
if (1912 <= y && y <= 1925)
cout << 'T' << y - 1911 << endl;
if (1926 <= y && y <= 1988)
cout << 'S' << y - ... | #include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
int e, y;
cin >> e >> y;
if (e == 0) {
if (1868 <= y && y <= 1911)
cout << 'M' << y - 1867 << endl;
if (1912 <= y && y <= 1925)
cout << 'T' << y - 1911 << endl;
if (1926 <= y && y <= 1988)
cout << 'S' << y - ... | [["-", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 181 | 2 |
#include <stdio.h>
int main() {
int e, y;
scanf("%d %d", &e, &y);
switch (e) {
case 0:
if (y < 1912) {
printf("M%d\n", y - 1867);
} else if (y < 1926) {
printf("H%d\n", y - 1911);
} else if (y < 1989) {
printf("S%d\n", y - 1925);
} else {
printf("H%d\n", y - 1988);
}
... | #include <stdio.h>
int main() {
int e, y;
scanf("%d %d", &e, &y);
switch (e) {
case 0:
if (y < 1912) {
printf("M%d\n", y - 1867);
} else if (y < 1926) {
printf("T%d\n", y - 1911);
} else if (y < 1989) {
printf("S%d\n", y - 1925);
} else {
printf("H%d\n", y - 1988);
}
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 182 | 2 |
#include <bits/stdc++.h>
#define LL long long int
using namespace std;
int main(void) {
int e, y;
cin >> e >> y;
if (e == 0) {
if (1868 >= y && y <= 1911)
cout << "M" << (y - 1868) + 1 << endl;
else if (1925 >= y)
cout << "T" << (y - 1912) + 1 << endl;
else if (1988 >= y)
cout << "S"... | #include <bits/stdc++.h>
#define LL long long int
using namespace std;
int main(void) {
int e, y;
cin >> e >> y;
if (e == 0) {
if (1911 >= y)
cout << "M" << (y - 1868) + 1 << endl;
else if (1925 >= y)
cout << "T" << (y - 1912) + 1 << endl;
else if (1988 >= y)
cout << "S" << (y - 1926... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 13], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 31, 13], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 196 | 6 |
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define FOR(i, j, k) for (int i = j; i < (int)k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define INF (1 << 30)
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> Pi;
const int MOD = 1e9 + 7;
const int dy[] = {0, 0, 1, -1};... | #include <bits/stdc++.h>
using namespace std;
//#define int long long
#define FOR(i, j, k) for (int i = j; i < (int)k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define INF (1 << 30)
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> Pi;
const int MOD = 1e9 + 7;
const int dy[] = {0, 0, 1, -1};... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 395 | 2 |
//============================================================================
// Name : AOJ.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <algor... | //============================================================================
// Name : AOJ.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <algor... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 215 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, a) for (int i = 0; i < a; i++)
#define mp make_pair
#define pb push_ba... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, a) for (int i = 0; i < a; i++)
#define mp make_pair
#define pb push_ba... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 17, 151]] | 1 | 208 | 4 |
#include <iostream>
using namespace std;
int main() {
int e, y;
cin >> e >> y;
if (e == 0) {
if (y <= 1911) {
cout << "M" << y - 1867 << endl;
} else if (y <= 1925) {
cout << "T" << y - 1911 << endl;
} else if (y <= 1988) {
cout << "S" << y - 1925 << endl;
} else {
cout <<... | #include <iostream>
using namespace std;
int main() {
int e, y;
cin >> e >> y;
if (e == 0) {
if (y <= 1911) {
cout << "M" << y - 1867 << endl;
} else if (y <= 1925) {
cout << "T" << y - 1911 << endl;
} else if (y <= 1988) {
cout << "S" << y - 1925 << endl;
} else {
cout <<... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 13]] | 1 | 173 | 2 |
#include <iostream>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0) {
if (1989 <= Y) {
cout << "H" << Y - 1988 << endl;
}
if (1926 <= Y && Y < 1989) {
cout << "S" << Y - 1925 << endl;
}
if (1912 <= Y && Y < 1926) {
cout << "T" << Y - 1911 << endl;
}... | #include <iostream>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0) {
if (1989 <= Y) {
cout << "H" << Y - 1988 << endl;
}
if (1926 <= Y && Y < 1989) {
cout << "S" << Y - 1925 << endl;
}
if (1912 <= Y && Y < 1926) {
cout << "T" << Y - 1911 << endl;
}... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 190 | 4 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0) {
if (Y >= 1989 && Y <= 2016)
cout << "H" << Y - 1988 << endl;
if (Y >= 1926 && Y <= 1988)
cout << "S" << Y - 1925 << endl;
if (Y >= 1912 && Y <= 1925)
cout << "T" << Y - 1911 << end... | #include <bits/stdc++.h>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0) {
if (Y >= 1989 && Y <= 2016)
cout << "H" << Y - 1988 << endl;
if (Y >= 1926 && Y <= 1988)
cout << "S" << Y - 1925 << endl;
if (Y >= 1912 && Y <= 1925)
cout << "T" << Y - 1911 << end... | [["-", 0, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 181 | 8 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int E, Y, Y2;
cin >> E >> Y;
if (E == 0) {
if (1868 <= Y && Y <= 1911) {
Y2 = Y - 1867;
cout << "M" << Y2 << endl;
}
if (1912 <= Y && Y <= 1925) {
Y2 = Y - 1911;
cout << "T" << Y2 << endl;
}
if (1926 <= Y && Y ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int E, Y, Y2;
cin >> E >> Y;
if (E == 0) {
if (1868 <= Y && Y <= 1911) {
Y2 = Y - 1867;
cout << "M" << Y2 << endl;
}
if (1912 <= Y && Y <= 1925) {
Y2 = Y - 1911;
cout << "T" << Y2 << endl;
}
if (1926 <= Y && Y ... | [["-", 64, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 13]] | 1 | 225 | 6 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0) {
if (1868 <= Y && Y <= 1911)
cout << "M" << (Y - 1867) << endl;
if (1912 <= Y && Y <= 1925)
cout << "T" << (Y - 1911) << endl;
if (1926 <= Y && Y <= 1988)
cout << "S" << (Y - 1925) << ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int E, Y;
cin >> E >> Y;
if (E == 0) {
if (1868 <= Y && Y <= 1911)
cout << "M" << (Y - 1867) << endl;
if (1912 <= Y && Y <= 1925)
cout << "T" << (Y - 1911) << endl;
if (1926 <= Y && Y <= 1988)
cout << "S" << (Y - 1925) << ... | [["-", 0, 16, 31, 16, 12, 23, 0, 16, 12, 13], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 12, 13]] | 1 | 194 | 2 |
def main():
E,Y = map(int,input().split())
if E == 0:
if Y <= 1911:
print("S"+str(Y-1867))
elif Y <= 1925:
print("T"+str(Y-1911))
elif Y<= 1988:
print("S"+str(Y-1925))
else:
print("H"+str(Y-1988))
elif E == 1:
print(str(... | def main():
E,Y = map(int,input().split())
if E == 0:
if Y <= 1911:
print("M"+str(Y-1867))
elif Y <= 1925:
print("T"+str(Y-1911))
elif Y<= 1988:
print("S"+str(Y-1925))
else:
print("H"+str(Y-1988))
elif E == 1:
print(str(... | [["-", 0, 652, 3, 4, 0, 657, 31, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 657, 31, 557, 0, 6]] | 5 | 158 | 2 |
#include <stdio.h>
int main(void) {
int w, h, c, i, j;
scanf("%d%d%d", &w, &h, &c);
for (i = 1; i < h || i < w; i++) {
if (w % i == 0 && h % i == 0) {
j = (w / i) * (h / i);
}
}
printf("%d\n", j * c);
return 0;
} | #include <stdio.h>
int main(void) {
int w, h, c, i, j;
scanf("%d%d%d", &w, &h, &c);
for (i = 1; i <= h || i <= w; i++) {
if (w % i == 0 && h % i == 0) {
j = (w / i) * (h / i);
}
}
printf("%d\n", j * c);
return 0;
} | [["-", 8, 9, 0, 7, 15, 16, 31, 16, 17, 18], ["+", 8, 9, 0, 7, 15, 16, 31, 16, 17, 19], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 18], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 19]] | 0 | 100 | 4 |
#include <iostream>
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
return (b, a % b);
}
int main() {
int W, H, C;
cin >> W >> H >> C;
int GCD = gcd(W, H);
cout << ((W / GCD) * (H / GCD) * C) << endl;
return 0;
}
| #include <iostream>
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
int W, H, C;
cin >> W >> H >> C;
int GCD = gcd(W, H);
cout << ((W / GCD) * (H / GCD) * C) << endl;
return 0;
}
| [["+", 0, 14, 8, 9, 0, 37, 0, 2, 63, 22]] | 1 | 89 | 1 |
#include <iostream>
using namespace std;
int gcd(int m, int n) {
if (n == 0) {
return 0;
}
return gcd(n, m % n);
}
int main() {
int W, H, C;
cin >> W >> H >> C;
int g = gcd(W, H);
cout << W / g * H / g * C << endl;
return 0;
} | #include <iostream>
using namespace std;
int gcd(int m, int n) {
if (n == 0) {
return m;
}
return gcd(n, m % n);
}
int main() {
int W, H, C;
cin >> W >> H >> C;
int g = gcd(W, H);
cout << W / g * H / g * C << endl;
return 0;
} | [["-", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 22]] | 1 | 86 | 2 |
#include <iostream>
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a * a;
return gcd(b, a % b);
}
int main() {
int w, h, c;
cin >> w >> h >> c;
cout << w / gcd(w, h) * h * c << endl;
return 0;
}
| #include <iostream>
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a * a;
return gcd(b, a % b);
}
int main() {
int w, h, c;
cin >> w >> h >> c;
cout << w * h / gcd(w, h) * c << endl;
return 0;
}
| [["+", 31, 16, 12, 16, 31, 16, 31, 16, 17, 48], ["+", 31, 16, 12, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["-", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22]] | 1 | 79 | 4 |
import math
A, B, C = [int(k) for k in raw_input().split(' ')]
print(C * ((A * B)/ (math.gcd(A, B) ** 2 )))
| import math
A, B, C = [int(k) for k in input().split(' ')]
print((C * ((A * B)/ (math.gcd(A, B) ** 2 ))))
| [["-", 0, 659, 12, 652, 63, 319, 500, 652, 63, 22], ["+", 0, 659, 12, 652, 63, 319, 500, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 657, 12, 23, 0, 657, 12, 23, 0, 25]] | 5 | 52 | 4 |
#include "bits/stdc++.h"
using namespace std;
#define int long long
constexpr int INF = 1LL << 60;
constexpr int MAXN = 100005;
struct UF {
int n, par[MAXN], bukatsu[MAXN];
void Init(int pn) {
n = pn;
for (int i = 1; i <= pn; ++i) {
par[i] = i;
}
}
int Find(int x) {
if (par[x] == x)
... | #include "bits/stdc++.h"
using namespace std;
#define int long long
constexpr int INF = 1LL << 60;
constexpr int MAXN = 100005;
struct UF {
int n, par[MAXN], bukatsu[MAXN];
void Init(int pn) {
n = pn;
for (int i = 1; i <= pn; ++i) {
par[i] = i;
}
}
int Find(int x) {
if (par[x] == x)
... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79]] | 1 | 407 | 2 |
#include <cstdio>
#include <vector>
using namespace std;
class union_find {
int *parent, *rank, n;
public:
int root(int a) { return parent[a] == a ? a : (parent[a] = root(parent[a])); }
union_find(int _n) {
n = _n;
parent = new int[n];
rank = new int[n];
for (int i = 0; i < n; i++)
parent[i... | #include <cstdio>
#include <vector>
using namespace std;
class union_find {
int *parent, *rank, n;
public:
int root(int a) { return parent[a] == a ? a : (parent[a] = root(parent[a])); }
union_find(int _n) {
n = _n;
parent = new int[n];
rank = new int[n];
for (int i = 0; i < n; i++)
parent[i... | [["-", 12, 69, 341, 342, 0, 2, 3, 4, 0, 22], ["+", 12, 69, 341, 342, 0, 2, 3, 4, 0, 22]] | 1 | 501 | 2 |
#include <algorithm>
#include <iostream>
#define f first
#define s second
using namespace std;
int main() {
pair<int, int> a[6];
for (int i = 0, c, b; i < 6 && cin >> c >> b; i++, a[i] = make_pair(c, b))
if (c > b)
swap(c, b);
sort(a, a + 6);
int r = 0;
for (int i = 0; i < 3; i++)
if (a[i * 2] !... | #include <algorithm>
#include <iostream>
#define f first
#define s second
using namespace std;
int main() {
pair<int, int> a[6];
for (int i = 0, c, b; i < 6 && cin >> c >> b; a[i++] = make_pair(c, b))
if (c > b)
swap(c, b);
sort(a, a + 6);
int r = 0;
for (int i = 0; i < 3; i++)
if (a[i * 2] != a... | [["-", 8, 9, 0, 7, 26, 34, 31, 27, 28, 22], ["-", 8, 9, 0, 7, 26, 34, 31, 27, 17, 29], ["-", 0, 14, 8, 9, 0, 7, 26, 34, 0, 21], ["+", 26, 11, 31, 69, 341, 342, 0, 27, 17, 29]] | 1 | 197 | 4 |
a = []
for _ in range(6):a.append(sorted(list(map(int, input().split()))))
a.sort(key = lambda x:x[1])
a.sort(key = lambda x:x[0])
print("yes" if a[0] == a[1] and a[2] == a[3] and a[4] == a[5] and a[0][0] == a[2][0] and a[0][1] == a[3][0] and a[2][1] == a[3][1] else "no")
| a = []
for _ in range(6):a.append(sorted(list(map(int, input().split()))))
a.sort(key = lambda x:x[1])
a.sort(key = lambda x:x[0])
print("yes" if a[0] == a[1] and a[2] == a[3] and a[4] == a[5] and a[0][0] == a[2][0] and a[0][1] == a[4][0] and a[2][1] == a[4][1] else "no")
| [["-", 31, 679, 12, 666, 0, 206, 51, 206, 206, 612], ["+", 31, 679, 12, 666, 0, 206, 51, 206, 206, 612], ["-", 0, 679, 12, 666, 0, 206, 51, 206, 206, 612], ["+", 0, 679, 12, 666, 0, 206, 51, 206, 206, 612]] | 5 | 151 | 4 |
#define __USE_MINGW_ANSI_STDIO 0
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
// #define int ll
using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<ll, ll>;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#def... | #define __USE_MINGW_ANSI_STDIO 0
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
// #define int ll
using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<ll, ll>;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#def... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 577 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdin = new Scanner(System.in);
int a = stdin.nextInt();
int b = stdin.nextInt();
int c = stdin.nextInt();
int d = stdin.nextInt();
if (a == b && c == d) {
System.out.println("Yes");
}... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdin = new Scanner(System.in);
int a = stdin.nextInt();
int b = stdin.nextInt();
int c = stdin.nextInt();
int d = stdin.nextInt();
if (a == b && c == d) {
System.out.println("yes");
}... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 156 | 4 |
#include <stdio.h>
int main(void) {
int e1, e2, e3, e4;
scanf("%d %d %d %d", &e1, &e2, &e3, &e4);
if ((e1 == e2 && e3 == e4) || (e1 == e3 && e2 == e4) ||
(e1 == e4 && e2 == e3))
printf("Yes\n");
else
printf("No\n");
return 0;
}
| #include <stdio.h>
int main(void) {
int e1, e2, e3, e4;
scanf("%d %d %d %d", &e1, &e2, &e3, &e4);
if ((e1 == e2 && e3 == e4) || (e1 == e3 && e2 == e4) ||
(e1 == e4 && e2 == e3))
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]] | 0 | 89 | 4 |
#include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
if (a == b || c == d) {
cout << "yes" << endl;
} else if (a == c || b == d) {
cout << "yes" << endl;
} else if (a == d || b == c) {
cout << "yes" << endl;
} else
cout << "no" << endl;
cin >> c;
} | #include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
if (a == b && c == d) {
cout << "yes" << endl;
} else if (a == c && b == d) {
cout << "yes" << endl;
} else if (a == d && b == c) {
cout << "yes" << endl;
} else
cout << "no" << endl;
cin >> c;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 106 | 6 |
#include <stdio.h>
int main() {
int e1, e2, e3, e4;
scanf("%d%d%d%d", &e1, &e2, &e3, &e4);
if (e1 == e2 && e3 == e4)
printf("Yes\n");
else if (e1 == e3 && e2 == e4)
printf("Yes\n");
else if (e1 == e4 && e2 == e3)
printf("Yes\n");
else if (e1 == e2 == e3 == e4)
printf("Yes\n");
else
... | #include <stdio.h>
int main() {
int e1, e2, e3, e4;
scanf("%d%d%d%d", &e1, &e2, &e3, &e4);
if (e1 == e2 && e3 == e4)
printf("yes\n");
else if (e1 == e3 && e2 == e4)
printf("yes\n");
else if (e1 == e4 && e2 == e3)
printf("yes\n");
else if (e1 == e2 == e3 == e4)
printf("yes\n");
else
... | [["-", 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 | 123 | 10 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a[4];
int i, j;
for (i = 0; i < 4; i++) {
cin >> a[i];
}
for (i = 0; i < 4; i++) {
for (j = 3; j > i; j--) {
if (a[i] > a[i]) {
swap(a[i], a[j]);
}
}
}
if (a[0] == a[1] && a[2] == a[3]) {
cou... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a[4];
int i, j;
for (i = 0; i < 4; i++) {
cin >> a[i];
}
for (i = 0; i < 4; i++) {
for (j = 3; j > i; j--) {
if (a[i] > a[j]) {
swap(a[i], a[j]);
}
}
}
if (a[0] == a[1] && a[2] == a[3]) {
cou... | [["-", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22]] | 1 | 150 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
if (a == b) {
if (c == d) {
cout << "yes" << endl;
} else {
cout << "no" << endl;
}
} else if (a == c) {
if (b == d) {
cout << "yes" << endl;
} else {
cout << "no" << e... | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
if (a == b) {
if (c == d) {
cout << "yes" << endl;
} else {
cout << "no" << endl;
}
} else if (a == c) {
if (b == d) {
cout << "yes" << endl;
} else {
cout << "no" << e... | [["-", 64, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 64, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 149 | 4 |
#include <bits/stdc++.h>
#define mk make_pair
using namespace std;
int main() {
set<pair<pair<int, int>, int>> t;
int n, a[3], sum = 0;
cin >> n;
while (n--) {
cin >> a[0] >> a[1] >> a[2];
sort(a, a + 3);
if (!t.count(mk(mk(a[0], a[1]), a[2])))
sum++;
t.insert(mk(mk(a[0], a[1]), a[2]));
... | #include <bits/stdc++.h>
#define mk make_pair
using namespace std;
int main() {
set<pair<pair<int, int>, int>> t;
int n, a[3], sum = 0;
cin >> n;
while (n--) {
cin >> a[0] >> a[1] >> a[2];
sort(a, a + 3);
if (t.count(mk(mk(a[0], a[1]), a[2])))
sum++;
t.insert(mk(mk(a[0], a[1]), a[2]));
}... | [["-", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111]] | 1 | 144 | 1 |
#include <algorithm>
#include <iostream>
#include <map>
using namespace std;
int main() {
map<int, bool> memo;
int N;
cin >> N;
int cnt = 0;
for (int i = 0; i < N; i++) {
int p[3];
cin >> p[0] >> p[1] >> p[2];
sort(p, p + 3);
int k = ((p[0] - 1) * 1000 + (p[1] - 1) * 1000 + (p[2] - 1));
... | #include <algorithm>
#include <iostream>
#include <map>
using namespace std;
int main() {
map<int, bool> memo;
int N;
cin >> N;
int cnt = 0;
for (int i = 0; i < N; i++) {
int p[3];
cin >> p[0] >> p[1] >> p[2];
sort(p, p + 3);
int k = ((p[0] - 1) * 1000 + (p[1] - 1)) * 1000 + (p[2] - 1);
... | [["+", 49, 50, 51, 16, 31, 16, 31, 23, 0, 25], ["-", 49, 50, 51, 23, 0, 16, 12, 23, 0, 25]] | 1 | 159 | 2 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int p[N][3];
for (int i = 0; i < N; i++) {
int ii[3];
for (int j = 0; j < 3; j++) {
cin >> ii[j];
}
sort(ii, ii + 3);
for (int j = 0; j < 3; j++) {
p[i][j] = ii[j];
}
}
bool er[N... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int p[N][3];
for (int i = 0; i < N; i++) {
int ii[3];
for (int j = 0; j < 3; j++) {
cin >> ii[j];
}
sort(ii, ii + 3);
for (int j = 0; j < 3; j++) {
p[i][j] = ii[j];
}
}
bool er[N... | [["-", 0, 7, 8, 9, 0, 57, 64, 93, 0, 94], ["+", 0, 7, 8, 9, 0, 57, 64, 116, 0, 117]] | 1 | 268 | 2 |
#include "bits/stdc++.h"
using namespace std;
int main() {
int N;
cin >> N;
set<vector<int>> points;
for (int i = 0; i < N; ++i) {
vector<int> v(3);
for (int i = 0; i < 3; ++i)
cin >> v[i];
sort(v.begin(), v.end());
points.emplace(v);
}
cout << points.size() << endl;
return 0;
} | #include "bits/stdc++.h"
using namespace std;
int main() {
int N;
cin >> N;
set<vector<int>> points;
for (int i = 0; i < N; ++i) {
vector<int> v(3);
for (int i = 0; i < 3; ++i)
cin >> v[i];
sort(v.begin(), v.end());
points.emplace(v);
}
cout << N - points.size() << endl;
return 0;
} | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33]] | 1 | 111 | 2 |
#include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, j, k) for (int i = (int)j; i < (int)k; i++)
#define itrep(i, x) for (auto i = (x).begin(); i != (x).end(); i++... | #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, j, k) for (int i = (int)j; i < (int)k; i++)
#define itrep(i, x) for (auto i = (x).begin(); i != (x).end(); i++... | [["+", 3, 4, 0, 16, 31, 16, 31, 16, 17, 48], ["+", 3, 4, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["+", 3, 4, 0, 16, 12, 16, 31, 16, 31, 22], ["+", 3, 4, 0, 16, 12, 16, 31, 16, 17, 48]] | 1 | 213 | 6 |
# encoding: 'utf-8'
N = int(input())
ls = list()
for _ in range(N):
e = sorted([int(x) for x in split(input())])
if e in ls:
continue
else:
ls.append(e)
print(N - len(ls)) | # encoding: 'utf-8'
N = int(input())
ls = list()
for _ in range(N):
e = sorted([int(x) for x in input().split()])
if e in ls:
continue
else:
ls.append(e)
print(N - len(ls)) | [["-", 3, 4, 0, 658, 0, 659, 12, 652, 63, 22], ["-", 0, 658, 0, 659, 12, 652, 3, 4, 0, 24], ["+", 0, 658, 0, 659, 12, 652, 63, 319, 0, 131], ["+", 0, 658, 0, 659, 12, 652, 63, 319, 319, 22], ["+", 0, 658, 0, 659, 12, 652, 3, 4, 0, 24]] | 5 | 65 | 5 |
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i, s, e) for (int(i) = (s); (i) <= (e); (i)++)
#define all(x) x.begin(), x.end()
int N;
vector<int> p;
int calc() {
int cnt = 0;
vector<int> P = p;
for (int i = 0; i < N - 1; i++) {
cnt += P[i];
P[i + 1] = max(0, P[i + 1] ... | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i, s, e) for (int(i) = (s); (i) <= (e); (i)++)
#define all(x) x.begin(), x.end()
int N;
vector<int> p;
int calc() {
int cnt = 0;
vector<int> P = p;
for (int i = 0; i < N - 1; i++) {
cnt += P[i];
P[i + 1] = max(0, P[i + 1] ... | [["-", 0, 1, 0, 2, 3, 4, 0, 69, 28, 22], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 70], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 13], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 73], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 209 | 5 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
int main(void) {
int n;
cin >> n;
vector<int> p(n);
REP(i, n) cin >> p[i];
if (n == 1) {
cout << p[0] << endl;
return 0;
}
... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
int main(void) {
int n;
cin >> n;
vector<int> p(n);
REP(i, n) cin >> p[i];
if (n == 1) {
cout << p[0] << endl;
return 0;
}
... | [["-", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89]] | 1 | 499 | 8 |
#include <bits/stdc++.h>
using namespace std;
int solve(vector<int> a) {
int size = a.size();
int cnt = 0;
for (int i = 0; i + 1 < size; i++) {
cnt += a[i] * 2;
a[i + 1] = max(0, a[i + 1] - a[i]);
}
return cnt + a[size - 1];
}
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i... | #include <bits/stdc++.h>
using namespace std;
int solve(vector<int> a) {
int size = a.size();
int cnt = 0;
for (int i = 0; i + 1 < size; i++) {
cnt += a[i] * 2;
a[i + 1] = max(0, a[i + 1] - a[i]);
}
return cnt + a[size - 1];
}
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i... | [["-", 8, 9, 0, 7, 15, 16, 12, 69, 28, 22], ["-", 0, 7, 15, 16, 12, 69, 341, 342, 0, 70], ["-", 0, 7, 15, 16, 12, 69, 341, 342, 0, 13], ["-", 0, 7, 15, 16, 12, 69, 341, 342, 0, 73], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 201 | 5 |
#include <iostream>
using namespace std;
int main() {
int n, p[5000], now[5000], i, result = 0, log = 0;
cin >> n;
for (i = 0; i < n; i++)
cin >> p[i];
for (i = 0; i <= now[0]; i++) {
log = 0;
for (int j = 0; j < n; j++)
now[j] = p[j];
now[0] -= i;
log += i;
for (int j = 0; j <... | #include <iostream>
using namespace std;
int main() {
int n, p[5000], now[5000], i, result = 10000000, log = 0;
cin >> n;
for (i = 0; i < n; i++)
cin >> p[i];
for (i = 0; i <= p[0]; i++) {
log = 0;
for (int j = 0; j < n; j++)
now[j] = p[j];
now[0] -= i;
log += i;
for (int j = 0... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 7, 15, 16, 12, 69, 28, 22], ["+", 8, 9, 0, 7, 15, 16, 12, 69, 28, 22], ["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22]] | 1 | 209 | 6 |
#include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n, ans = 1e9;
cin >> n;
int a[n], b[n];
r(i, n) cin >> a[i];
r(i, n) b[i] = a[i];
r(j, 4) {
int s1 = 0;
r(i, n) a[i] = b[i];
a[0]--;
for (int i = 0; i < n - 1; i++) {
if (a[i] <= ... | #include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n, ans = 1e9;
cin >> n;
int a[n], b[n];
r(i, n) cin >> a[i];
r(i, n) b[i] = a[i];
r(j, 4) {
int s1 = 0;
r(i, n) a[i] = b[i];
a[0] -= j;
for (int i = 0; i < n - 1; i++) {
if (a[i] ... | [["-", 8, 9, 0, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 9, 0, 1, 0, 11, 17, 110], ["+", 8, 9, 0, 9, 0, 1, 0, 11, 12, 22]] | 1 | 202 | 3 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
// math
//-------------------------------------------
template <class T> inline T sqr... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
// math
//-------------------------------------------
template <class T> inline T sqr... | [["-", 0, 2, 3, 4, 0, 16, 31, 69, 28, 22], ["+", 0, 2, 3, 4, 0, 16, 31, 69, 28, 22]] | 1 | 334 | 2 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int p[5000];
for (int i = 0; i < n; i++) {
cin >> p[i];
}
int min_sum = 20000;
for (int i = 0; i <= p[0]; i++) {
int q[5000];
for (int j = 0; j < n; j++) {
q[j] = p[j];
}
int sum = i... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int p[5000];
for (int i = 0; i < n; i++) {
cin >> p[i];
}
int min_sum = 20000;
for (int i = 0; i <= p[0]; i++) {
int q[5000];
for (int j = 0; j < n; j++) {
q[j] = p[j];
}
int sum = i... | [["-", 0, 11, 12, 16, 31, 69, 341, 342, 0, 22], ["+", 0, 11, 12, 16, 31, 69, 341, 342, 0, 22]] | 1 | 208 | 2 |
#include <algorithm>
#include <cstdio>
#include <functional>
#define M 2000000000
using namespace std;
int main(void) {
int n, i, j, sum, p[5000], a[5000], mn;
scanf("%d", &n);
for (i = 0; i < n; i++)
scanf("%d", &p[i]);
mn = M;
for (i = 0; i <= p[0]; i++) {
for (j = 0; j < n; j++)
a[j] = p[j];
... | #include <algorithm>
#include <cstdio>
#include <functional>
#define M 2000000000
using namespace std;
int main(void) {
int n, i, j, sum, p[5000], a[5000], mn;
scanf("%d", &n);
for (i = 0; i < n; i++)
scanf("%d", &p[i]);
mn = M;
for (i = 0; i <= p[0]; i++) {
for (j = 0; j < n; j++)
a[j] = p[j];
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 236 | 2 |
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define FOR(i, j, k) for (int i = j; i < (int)k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define INF (1 << 30)
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> Pi;
const int MOD = 1e9 + 7;
const int dy[] = {0, 0, 1, -1};... | #include <bits/stdc++.h>
using namespace std;
//#define int long long
#define FOR(i, j, k) for (int i = j; i < (int)k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define INF (1 << 30)
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> Pi;
const int MOD = 1e9 + 7;
const int dy[] = {0, 0, 1, -1};... | [["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 22], ["+", 0, 2, 3, 4, 0, 69, 341, 342, 0, 22]] | 1 | 401 | 4 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define pb push_back
#define rep(i, a, n) for (int i = (a); i < (n); i++)
#define dep(i, a, n) for (int i = (a); i >= (n); i--)
#define mod 1e9 + 7
__attribute__((constructor)) void initial() {
cin.tie(0);
ios::sync_wit... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define pb push_back
#define rep(i, a, n) for (int i = (a); i < (n); i++)
#define dep(i, a, n) for (int i = (a); i >= (n); i--)
#define mod 1e9 + 7
__attribute__((constructor)) void initial() {
cin.tie(0);
ios::sync_wit... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]] | 1 | 264 | 4 |
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <typeinfo>
#include <vector>
#define syos... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <typeinfo>
#include <vector>
#define syos... | [["+", 31, 16, 12, 2, 3, 4, 0, 83, 0, 21], ["+", 12, 2, 3, 4, 0, 83, 0, 2, 63, 22], ["+", 3, 4, 0, 83, 0, 2, 3, 4, 0, 24], ["+", 3, 4, 0, 83, 0, 2, 3, 4, 0, 13], ["+", 3, 4, 0, 83, 0, 2, 3, 4, 0, 25]] | 1 | 429 | 5 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define pb push_back
#define rep(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, n) for (int i = a; i < (n); i++)
#define mod (ll)(1e9 + 7)
#define int ll
#define INF 100000000
__attribute__((constructor)) void initial(... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define pb push_back
#define rep(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, n) for (int i = a; i < (n); i++)
#define mod (ll)(1e9 + 7)
#define int ll
#define INF 100000000
__attribute__((constructor)) void initial(... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 9, 0, 43, 49, 50, 49, 22], ["+", 8, 9, 0, 9, 0, 43, 49, 50, 49, 22]] | 1 | 252 | 6 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int A, B;
string a, b;
cin >> a >> b;
A = a.size();
B = b.size();
vector<vector<ll>> dp(B, vector<ll>(A));
constexpr ll MOD = ((1e9) + 7);
for (int i = 0; i < B; i++) {
for (int j = 0; j < A; j++) {
if (i > 0... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int A, B;
string a, b;
cin >> a >> b;
A = a.size();
B = b.size();
vector<vector<ll>> dp(B + 1, vector<ll>(A + 1));
constexpr ll MOD = ((1e9) + 7);
for (int i = 0; i < B; i++) {
for (int j = 0; j < A; j++) {
i... | [["+", 0, 43, 49, 50, 51, 4, 0, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 4, 0, 16, 12, 13], ["+", 51, 4, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 51, 4, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 238 | 4 |
#include <iostream>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
int dp[1001];
int main() {
string s, t;
cin >> s >> t;
dp[0] = 1;
REP(i, s.size()) REP(_j, t.size()) {
int j = t.size() - _j; // reverse j
if (s[i] == t[j]) {
dp[j + 1] +=... | #include <iostream>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
int dp[1001];
int main() {
string s, t;
cin >> s >> t;
dp[0] = 1;
REP(i, s.size()) REP(_j, t.size()) {
int j = t.size() - 1 - _j; // j??????????????????
if (s[i] == t[j]) {
... | [["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 0, 9, 0, 43, 49, 50, 51, 16, 17, 33]] | 1 | 146 | 2 |
a,b = map(int,input())
print((a+b)//2) | a,b = map(int,input().split())
print((a+b)//2) | [["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 22 | 4 |
print(sum(map(int,input().split()))/2) | print(int(sum(map(int,input().split()))/2)) | [["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 20 | 3 |
a,b=map(int,input().split())
print((a+b)/2)
| a,b=map(int,input().split())
print((a+b)//2)
| [["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 85], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 676]] | 5 | 26 | 2 |
# coding=utf-8
a, b = map(int, input().split())
print((a+b)/2)
| # coding=utf-8
a, b = map(int, input().split())
print((a+b)//2)
| [["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 85], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 676]] | 5 | 27 | 2 |
#include <stdio.h>
int main(void) {
int m, f, b, kari;
scanf("%d %d %d", &m, &f, &b);
if (m >= b) {
printf("0\n");
} else if (m + f <= b) {
printf("NA\n");
} else {
kari = b - m;
printf("%d\n", kari);
}
return 0;
}
| #include <stdio.h>
int main(void) {
int m, f, b, kari;
scanf("%d %d %d", &m, &f, &b);
if (m >= b) {
printf("0\n");
} else if (m + f < b) {
printf("NA\n");
} else {
kari = b - m;
printf("%d\n", kari);
}
return 0;
}
| [["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 19], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 18]] | 0 | 91 | 2 |
#include <stdio.h>
int main(void) {
int m, f, b;
int sum;
scanf("%d %d %d", &m, &f, &b);
sum = b - m;
if (m > b) {
printf("0\n");
} else if (sum >= f) {
printf("NA\n");
} else if (sum < f) {
printf("%d\n", sum);
}
return 0;
}
| #include <stdio.h>
int main(void) {
int m, f, b;
int sum;
scanf("%d %d %d", &m, &f, &b);
sum = b - m;
if (m > b) {
printf("0\n");
} else if (sum > f) {
printf("NA\n");
} else if (sum <= f) {
printf("%d\n", sum);
}
return 0;
}
| [["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 20], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 47], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 19]] | 0 | 96 | 4 |
a, b, c, d = sorted(map(int, input().split()))
print("YES" if a == b and c == d else "NO") | a, b, c, d = sorted(map(int, input().split()))
print("yes" if a == b and c == d else "no") | [["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]] | 5 | 41 | 4 |
lst=list(input().split())
if lst[0]==lst[1] and lst[2]==lst[3]:
print('yes')
else:
print('no') | lst=list(input().split())
lst.sort()
if lst[0]==lst[1] and lst[2]==lst[3]:
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 | 47 | 5 |
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var arr = input.trim().split(" ").map(Number);
arr.sort(function(a, b) { return a < b; });
var sum = 0;
if (arr[0] == arr[1] && arr[1] == arr[2] && arr[2] == arr[3])
sum++;
if (arr[0 + 4] == arr[1 + 4] && arr[1 + 4] == arr[2 + 4] &&
arr[2 + 4] == arr[3... | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var arr = input.trim().split(" ").map(Number);
arr.sort(function(a, b) { return a - b; });
var sum = 0;
if (arr[0] == arr[1] && arr[1] == arr[2] && arr[2] == arr[3])
sum++;
if (arr[0 + 4] == arr[1 + 4] && arr[1 + 4] == arr[2 + 4] &&
arr[2 + 4] == arr[3... | [["-", 0, 63, 8, 556, 0, 37, 0, 16, 17, 18], ["+", 0, 63, 8, 556, 0, 37, 0, 16, 17, 33]] | 2 | 214 | 2 |
#include <stdio.h>
int main(void) {
int i, e[128] = {0}, r = 0, m;
for (i = 1; i <= 12; i++) {
scanf("%d", &m);
e[m]++;
}
for (i = 1; i <= 100; i++) {
if (e[m] % 4 == 0) {
r += (e[m] / 4);
}
}
if (r == 3) {
printf("yes\n");
} else {
printf("no\n");
}
return 0;
} | #include <stdio.h>
int main(void) {
int i, e[128] = {0}, r = 0, m;
for (i = 1; i <= 12; i++) {
scanf("%d", &m);
e[m]++;
}
for (i = 1; i <= 100; i++) {
if (e[i] % 4 == 0) {
r += (e[i] / 4);
}
}
if (r == 3) {
printf("yes\n");
} else {
printf("no\n");
}
return 0;
} | [["-", 15, 23, 0, 16, 31, 16, 31, 69, 71, 22], ["+", 15, 23, 0, 16, 31, 16, 31, 69, 71, 22], ["-", 0, 11, 12, 23, 0, 16, 31, 69, 71, 22], ["+", 0, 11, 12, 23, 0, 16, 31, 69, 71, 22]] | 0 | 127 | 4 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
map<int, int> mp;
rep(i, 4) {
int e;
cin >> e;
mp[e]++;
}
for (auto p : mp) {
if (p.second < 4) {
puts("no");
return 0;
}
}
puts("yes");
} | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
map<int, int> mp;
rep(i, 12) {
int e;
cin >> e;
mp[e]++;
}
for (auto p : mp) {
if (p.second < 4) {
puts("no");
return 0;
}
}
puts("yes");
} | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]] | 1 | 86 | 2 |
e = list(map(int, input().split()))
print("yes" if len(set(e[:4])) == len(set(e[4:8])) == len(set(e[8:])) == 1 else "no") | e = sorted(map(int, input().split()))
print("yes" if len(set(e[:4])) == len(set(e[4:8])) == len(set(e[8:])) == 1 else "no") | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 66 | 2 |
/*
AOJ #0347
title:
@kankichi573
*/
#include <float.h>
#include <stdio.h>
#include <stdlib.h>
double max(double x, double y) {
if (x > y)
return (x);
else
return (y);
}
int n, ar[1000];
int comp(const void *a, const void *b) {
if (*(int *)a < *(int *)b) {
return -1;
} else if (*(int *)a == ... | /*
AOJ #0347
title:
@kankichi573
*/
#include <float.h>
#include <stdio.h>
#include <stdlib.h>
double max(double x, double y) {
if (x > y)
return (x);
else
return (y);
}
int n, ar[1000];
int comp(const void *a, const void *b) {
if (*(int *)a < *(int *)b) {
return -1;
} else if (*(int *)a == ... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 12, 23, 0, 16, 31, 69, 71, 16, 12, 13], ["+", 12, 23, 0, 16, 31, 69, 71, 16, 12, 13], ["-", 12, 23, 0, 16, 12, 69, 71, 16, 12, 13], ["+", 12, 23, 0, 16, 12, 69, 71, 16, 12, 13]] | 0 | 322 | 6 |
#include <bits/stdc++.h>
using namespace std;
long long a[1001], i, ma = 100000, p, n;
long double m1, m2;
int main() {
cin >> n;
for (; i < n; i++)
cin >> a[i];
sort(a, a + n);
m1 = (double)(a[n - 1] + a[n - 2]) / (a[1] - a[0]);
for (i = n - 1; i > 0; i--)
if (a[i] - a[i - 1] <= ma) {
ma = a[i]... | #include <bits/stdc++.h>
using namespace std;
long long a[1001], i, ma = 100000, p, n;
long double m1, m2;
int main() {
cin >> n;
for (; i < n; i++)
cin >> a[i];
sort(a, a + n);
m1 = (double)(a[n - 1] + a[n - 2]) / (a[1] - a[0]);
for (i = n - 1; i > 0; i--)
if (a[i] - a[i - 1] <= ma) {
ma = a[i]... | [["-", 8, 57, 64, 9, 0, 1, 0, 16, 31, 22], ["-", 8, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["-", 8, 57, 64, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 7, 8, 57, 64, 9, 0, 1, 0, 35]] | 1 | 231 | 4 |
#include <algorithm>
#include <functional>
#include <stdio.h>
#include <utility>
using namespace std;
int main(void) {
int i, j, k, l, n;
double ans = 0;
scanf("%d", &n);
int a[n];
pair<int, int> d[n];
for (i = 0; i < n; ++i)
scanf("%d", &a[i]);
sort(a, a + n, greater<int>());
for (i = 0; i < n - 1... | #include <algorithm>
#include <functional>
#include <stdio.h>
#include <utility>
using namespace std;
int main(void) {
int i, j, k, l, n;
double ans = 0;
scanf("%d", &n);
int a[n];
pair<int, int> d[n];
for (i = 0; i < n; ++i)
scanf("%d", &a[i]);
sort(a, a + n, greater<int>());
for (i = 0; i < n - 1... | [["-", 12, 118, 28, 69, 341, 342, 0, 16, 31, 22], ["-", 12, 118, 28, 69, 341, 342, 0, 16, 17, 33], ["-", 12, 118, 28, 69, 341, 342, 0, 16, 12, 13], ["+", 12, 16, 12, 118, 28, 69, 341, 342, 0, 13]] | 1 | 479 | 4 |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int X = scan.nextInt();
if (X % 7 == 0) {
System.out.println("sat");
} else if (X % 7 == 1) {
System.out.println("fri");
} else if (X % 7 == 2) {
System.out.p... |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int X = scan.nextInt();
if (X % 7 == 0) {
System.out.println("thu");
} else if (X % 7 == 1) {
System.out.println("fri");
} else if (X % 7 == 2) {
System.out.p... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 196 | 12 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String day[] = {"sat", "sun", "mon", "tue", "wed", "thu", "fri"};
System.out.println(day[in.nextInt() % 7]);
}
}
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String day[] = {"sat", "sun", "mon", "tue", "wed", "thu", "fri"};
System.out.println(day[(in.nextInt() + 5) % 7]);
}
}
| [["+", 3, 4, 0, 504, 71, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 31, 492, 3, 4, 0, 25], ["+", 0, 504, 71, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 504, 71, 16, 31, 23, 0, 16, 12, 499]] | 3 | 88 | 4 |
#include <stdio.h>
int main() {
int x;
scanf("%d", &x);
if (x % 7 == 2)
printf("sat\n");
if (x % 7 == 3)
printf("sun\n");
if (x % 7 == 4)
printf("mon\n");
if (x % 7 == 5)
printf("tue\n");
if (x % 7 == 6)
printf("wed\n");
if (x % 7 == 0)
printf("thu\n");
if (x % 7 == 2)
prin... | #include <stdio.h>
int main() {
int x;
scanf("%d", &x);
if (x % 7 == 2)
printf("sat\n");
if (x % 7 == 3)
printf("sun\n");
if (x % 7 == 4)
printf("mon\n");
if (x % 7 == 5)
printf("tue\n");
if (x % 7 == 6)
printf("wed\n");
if (x % 7 == 0)
printf("thu\n");
if (x % 7 == 1)
prin... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 136 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x;
vector<string> v{"thu", "fri", "sat", "sun", "mon", "tue", "wed"};
cout << v[x % 7] << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
vector<string> v{"thu", "fri", "sat", "sun", "mon", "tue", "wed"};
cout << v[x % 7] << endl;
} | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 61 | 4 |
#include <iostream>
using namespace std;
int main() {
int x;
cin >> x;
switch (x) {
case 2:
cout << "sat\n";
break;
case 3:
cout << "sun\n";
break;
case 4:
cout << "mon\n";
break;
case 5:
cout << "tue\n";
break;
case 6:
cout << "wed\n";
break;
case 0:
cout <... | #include <iostream>
using namespace std;
int main() {
int x;
cin >> x;
switch (x % 7) {
case 2:
cout << "sat\n";
break;
case 3:
cout << "sun\n";
break;
case 4:
cout << "mon\n";
break;
case 5:
cout << "tue\n";
break;
case 6:
cout << "wed\n";
break;
case 0:
co... | [["+", 8, 9, 0, 99, 15, 339, 51, 16, 17, 109], ["+", 8, 9, 0, 99, 15, 339, 51, 16, 12, 13], ["+", 0, 99, 8, 9, 0, 100, 0, 1, 0, 35], ["+", 0, 99, 8, 9, 0, 100, 0, 93, 0, 94]] | 1 | 111 | 4 |
#include <iostream>
#include <stdio.h>
using namespace std;
#include <math.h>
int main() {
int x;
cin >> x;
if (x == 4 || x == 11 || x == 18 || x == 25)
cout << "mon" << endl;
if (x == 5 || x == 12 || x == 19 || x == 26)
cout << "tue" << endl;
if (x == 6 || x == 13 || x == 20 || x == 27)
cout << "... | #include <iostream>
#include <stdio.h>
using namespace std;
#include <math.h>
int main() {
int x;
cin >> x;
if (x == 4 || x == 11 || x == 18 || x == 25)
cout << "mon" << endl;
if (x == 5 || x == 12 || x == 19 || x == 26)
cout << "tue" << endl;
if (x == 6 || x == 13 || x == 20 || x == 27)
cout << "... | [["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 211 | 5 |
inputs = $stdin.read.split("\n")
count = inputs.first.to_i
samples = inputs.last.split(' ').map(&:to_f).sort
samples_1 = samples
samples_2 = samples - [samples.min]
distance = 9999999999999999999999
min_dis_index = 0
samples_2.each_with_index do |v, i|
if (v - samples_1[i]) < distance
distance = v - samples_1[i... | inputs = $stdin.read.split("\n")
count = inputs.first.to_i
samples = inputs.last.split(' ').map(&:to_f).sort
samples_1 = samples
samples_2 = samples - [samples.min]
distance = 9999999999999999999999
min_dis_index = 0
samples_2.each_with_index do |v, i|
if (v - samples_1[i]) < distance
distance = v - samples_1[i... | [["-", 0, 493, 0, 652, 3, 4, 0, 652, 735, 22], ["+", 0, 493, 0, 652, 3, 4, 0, 652, 735, 22]] | 4 | 325 | 2 |
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = a; i <= (int)b; ++i)
#define FOD(i, a, b) for (int i = a; i >= b; --i)
using namespace std;
int TTest, vs[15], num[3], f[1 << 13][2];
void init() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
// freopen("main.inp","r",stdin);
// freopen("main.o... | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = a; i <= (int)b; ++i)
#define FOD(i, a, b) for (int i = a; i >= b; --i)
using namespace std;
int TTest, vs[15], num[3], f[(1 << 13) + 3][2];
void init() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
// freopen("main.inp","r",stdin);
// freopen("... | [["+", 49, 80, 49, 80, 81, 16, 31, 23, 0, 24], ["+", 49, 80, 49, 80, 81, 16, 31, 23, 0, 25], ["+", 0, 43, 49, 80, 49, 80, 81, 16, 17, 72], ["+", 0, 43, 49, 80, 49, 80, 81, 16, 12, 13]] | 1 | 454 | 4 |
#include <bits/stdc++.h>
using namespace std;
bool read(int &x) { return (scanf("%d", &x) != EOF); }
int q;
main() {
// freopen("4.inp", "r", stdin);
// freopen("4.out", "w", stdout);
cin >> q;
while (q--) {
int mark[15] = {};
memset(mark, 0, sizeof mark);
for (int i = 1; i <= 6; i++) {
in... | #include <bits/stdc++.h>
using namespace std;
bool read(int &x) { return (scanf("%d", &x) != EOF); }
int q;
main() {
// freopen("4.inp", "r", stdin);
// freopen("4.out", "w", stdout);
cin >> q;
while (q--) {
int mark[15] = {};
memset(mark, 0, sizeof mark);
for (int i = 1; i <= 6; i++) {
in... | [["-", 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 | 464 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.