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 <cmath>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
double dp[12][1 << 12];
int main() {
int width;
while (cin >> width) {
for (int i = 0; i < 12; ++i) {
for (int j = 0; j < (1 << 12); ++j) {
dp[i][j] = -1.0;
}
}
string ... | #include <cmath>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
double dp[12][1 << 12];
int main() {
int width;
while (cin >> width) {
for (int i = 0; i < 12; ++i) {
for (int j = 0; j < (1 << 12); ++j) {
dp[i][j] = -1.0;
}
}
string ... | [["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 430 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long int lli;
typedef pair<int,... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long int lli;
typedef pair<int,... | [["-", 15, 339, 51, 91, 28, 23, 0, 16, 31, 13], ["+", 15, 339, 51, 91, 28, 23, 0, 16, 31, 22]] | 1 | 510 | 2 |
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <... | #include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <... | [["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 597 | 2 |
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <cstdio>
using namespace std;
int main() {
char buf[200];
int r[12];
double p[12][12];
double dp[1 << 12][12];
double ans;
int w;
int n, iread, ibuf;
int v;
while (fgets(buf, sizeof(buf), stdin)) {
n = 0;
ibuf = 0;
sscanf(bu... | #include <algorithm>
#include <cfloat>
#include <cmath>
#include <cstdio>
using namespace std;
int main() {
char buf[200];
int r[12];
double p[12][12];
double dp[1 << 12][12];
double ans;
int w;
int n, iread, ibuf;
int v;
while (fgets(buf, sizeof(buf), stdin)) {
n = 0;
ibuf = 0;
sscanf(bu... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 489 | 2 |
import java.util.ArrayDeque;
import java.util.HashMap;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int[] init = {0, 1, 2, 3, 4, 5, 6, 7};
HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
map.put(encode(init), 0);
ArrayDeque<int[]> que = new A... | import java.util.ArrayDeque;
import java.util.HashMap;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int[] init = {0, 1, 2, 3, 4, 5, 6, 7};
HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
map.put(encode(init), 0);
ArrayDeque<int[]> que = new A... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]] | 3 | 438 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
//反向bfs
using namespace std;
map<string, int> t;
int num;
int mv[] = {-4, 4, 1, -1}; //上下右左
void bfs(string st) {
queue<s... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
//反向bfs
using namespace std;
map<string, int> t;
int num;
int mv[] = {-4, 4, 1, -1}; //上下右左
void bfs(string st) {
queue<s... | [["-", 0, 52, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 52, 8, 9, 0, 43, 49, 50, 49, 22]] | 1 | 352 | 2 |
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
// aoj 0121 广度优先搜索
//将一组数字看作一个状态,遍历所有的状态空间,放在res中
using namespace std;
int d[4] = {1, -1, 4, -4};
map<string, int> res;
//用于存储所有状态空间
void slove() {
queue<string> que;
que.push("01234567");
while (!que.empty()) {
... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
// aoj 0121 广度优先搜索
//将一组数字看作一个状态,遍历所有的状态空间,放在res中
using namespace std;
int d[4] = {1, -1, 4, -4};
map<string, int> res;
//用于存储所有状态空间
void slove() {
queue<string> que;
que.push("01234567");
while (!que.empty()) {
... | [["-", 12, 91, 28, 23, 0, 16, 0, 42, 0, 32], ["+", 12, 91, 28, 23, 0, 16, 31, 16, 17, 60]] | 1 | 317 | 32 |
N = eval(input())
while True:
dic = {}
for i in range(N):
lis = input().split()
dic[lis[0]] = [3*int(lis[1])+int(lis[3]), N-i]
for k, v in sorted(list(dic.items()), key=lambda x: (x[0][0], x[0][1]), reverse=True):
print('%s,%s' % (k, v[0]))
N = eval(input())
if N == 0: ... | N = eval(input())
while True:
dic = {}
for i in range(N):
lis = input().split()
dic[lis[0]] = [3*int(lis[1])+int(lis[3]), N-i]
for k, v in sorted(list(dic.items()), key=lambda x: (x[1][0], x[1][1]), reverse=True):
print('%s,%s' % (k, v[0]))
N = eval(input())
if N == 0: ... | [["-", 51, 670, 8, 660, 0, 206, 51, 206, 206, 612], ["+", 51, 670, 8, 660, 0, 206, 51, 206, 206, 612]] | 5 | 139 | 4 |
b=False
while True:
n = int(input())
if n==0:break
d=dict()
if b:print()
b=True
for _ in range(n):
line = input().split()
tmp = int(line[1])*3+int(line[3]*1)
if tmp in d:
d[tmp].append(line[0])
else:
d[tmp] = []
d[tmp].append(li... | b=False
while True:
n = int(input())
if n==0:break
d=dict()
if b:print()
b=True
for _ in range(n):
line = input().split()
tmp = int(line[1])*3+int(line[3]*1)
if tmp in d:
d[tmp].append(line[0])
else:
d[tmp] = []
d[tmp].append(li... | [["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 158 | 4 |
n=eval(input())
while True:
p={}
for i in range(n):
t=input().split()
p[t[0]] = [3*int(t[1])+1*int(t[3]),i]
for k,v in sorted(list(p.items()),key=lambda x:x[1])[::-1]:
print("%s,%d"%(k,v[0]))
n=eval(input())
if n==0:break
print() | n=eval(input())
while True:
p={}
for i in range(n):
t=input().split()
p[t[0]] = [3*int(t[1])+1*int(t[3]),-i]
for k,v in sorted(list(p.items()),key=lambda x:x[1])[::-1]:
print("%s,%d"%(k,v[0]))
n=eval(input())
if n==0:break
print() | [["+", 0, 1, 0, 662, 12, 634, 0, 664, 17, 33]] | 5 | 128 | 1 |
import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
;
int INF = 1 << 28;
double EPS = 1e-9;
void run() {
for (;;) {
int y1 = sc.nextInt();
int m1 = sc.nextInt();
int d1 = sc.nextInt();
int y2 = s... | import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
;
int INF = 1 << 28;
double EPS = 1e-9;
void run() {
for (;;) {
int y1 = sc.nextInt();
int m1 = sc.nextInt();
int d1 = sc.nextInt();
int y2 = s... | [["-", 0, 1, 0, 11, 12, 504, 71, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 504, 71, 16, 12, 499]] | 3 | 411 | 2 |
import java.util.Scanner;
public class Main {
static final int[] md = new int[12];
static {
int[] days = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int day = 0;
for (int i = 0; i < 12; i++) {
md[i] = day;
day += days[i];
}
}
public static void main(String[] args) {
Scann... | import java.util.Scanner;
public class Main {
static final int[] md = new int[12];
static {
int[] days = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int day = 0;
for (int i = 0; i < 12; i++) {
md[i] = day;
day += days[i];
}
}
public static void main(String[] args) {
Scann... | [["+", 0, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["-", 0, 16, 12, 23, 0, 16, 12, 23, 0, 24], ["+", 0, 16, 12, 23, 0, 16, 31, 23, 0, 25], ["-", 0, 16, 12, 23, 0, 16, 12, 23, 0, 25], ["-", 8, 196, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 196, 0, 1, 0, 11, 12, 16, 17, 72]] | 3 | 343 | 6 |
#include <stdio.h>
int is_leap(int y) {
if ((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0)) {
return (1);
} else {
return (0);
}
}
int day_count(int y, int m, int d) {
int cnt = 0;
cnt += d;
while (m > 0) {
if (m == 2) {
if (is_leap(y) == 1) {
cnt += 29;
} else {
c... | #include <stdio.h>
int is_leap(int y) {
if ((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0)) {
return (1);
} else {
return (0);
}
}
int day_count(int y, int m, int d) {
int cnt = 0;
cnt += d;
m--;
while (m > 0) {
if (m == 2) {
if (is_leap(y) == 1) {
cnt += 29;
} else {
... | [["+", 0, 14, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 0 | 310 | 3 |
a, b, c;
main(d, e, f) {
for (; scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f), ~a;
printf("%d\n", (365 * d + d / 4 - d / 100 + d / 400 +
306 * (e + 1) / 10 - 428 + f) -
(365 * a + a / 4 - a / 100 + a / 400 +
306 * (b + 1) / 10 - 428 + ... | a, b, c;
main(d, e, f) {
for (; scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f), ~a;
printf("%d\n", (365 * d + d / 4 - d / 100 + d / 400 +
306 * (e + 1) / 10 - 428 + f) -
(365 * a + a / 4 - a / 100 + a / 400 +
306 * (b + 1) / 10 - 428 + ... | [["+", 8, 9, 0, 1, 0, 41, 75, 23, 0, 24], ["+", 8, 9, 0, 1, 0, 41, 75, 23, 0, 25]] | 0 | 151 | 4 |
#include <stdio.h>
main() {
int y1, m1, d3, y2, m2, d4, day[1000000] = {0}, i, j;
double d1, d2;
for (i = 0; i < 1000000; i++) {
if (i % 400 == 0)
day[i] = 1;
else if (i % 4 == 0 && i % 100 != 0)
day[i] = 1;
}
while (1) {
d1 = 0, d2 = 0;
scanf("%d %d %d %d %d %d", &y1, &m1, &d3, &... | #include <stdio.h>
main() {
int y1, m1, d3, y2, m2, d4, day[1000000] = {0}, i, j;
double d1, d2;
for (i = 0; i < 1000000; i++) {
if (i % 400 == 0)
day[i] = 1;
else if (i % 4 == 0 && i % 100 != 0)
day[i] = 1;
}
while (1) {
d1 = 0, d2 = 0;
scanf("%d %d %d %d %d %d", &y1, &m1, &d3, &... | [["-", 0, 57, 15, 23, 0, 16, 31, 69, 71, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 71, 22]] | 0 | 388 | 2 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int y1, m1, d1, y2, m2, d2, year[10000],
month[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
int i, j, k;
void swap(int *x, int *y) {
int z;
z = *x;
*x = *y;
*y = z;
}
int isleap(int y) {
if (y % 400 == 0)
return 1;
if (y... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int y1, m1, d1, y2, m2, d2, year[5000],
month[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
int i, j, k;
void swap(int *x, int *y) {
int z;
z = *x;
*x = *y;
*y = z;
}
int isleap(int y) {
if (y % 400 == 0)
return 1;
if (y ... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 0, 41, 15, 23, 0, 16, 31, 16, 12, 13], ["+", 0, 41, 15, 23, 0, 16, 31, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 0 | 286 | 6 |
#include <ctype.h>
#include <stdio.h>
#include <string.h>
int main() {
int y1, m1, d1, y2, m2, d2, i, j;
int cnt = 0;
int month[][12] = {{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334},
{0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335}};
while (1) {
cnt = 0;
scanf("%d... | #include <ctype.h>
#include <stdio.h>
#include <string.h>
int main() {
int y1, m1, d1, y2, m2, d2, i, j;
int cnt = 0;
int month[][12] = {{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334},
{0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335}};
while (1) {
cnt = 0;
scanf("%d... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22]] | 0 | 320 | 4 |
#include <bits/stdc++.h>
using namespace std;
int pm(int y, int m) {
int sum = 0;
int s[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
for (int i = 0; i < m; i++) {
sum += s[i];
if (i == 1 && y % 4 == 0 && (y % 100 != 0 || y % 400 == 0))
sum += 1;
}
return sum;
}
int main() {
int y1, ... | #include <bits/stdc++.h>
using namespace std;
int pm(int y, int m) {
int sum = 0;
int s[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
for (int i = 0; i < m - 1; i++) {
sum += s[i];
if (i == 1 && y % 4 == 0 && (y % 100 != 0 || y % 400 == 0))
sum += 1;
}
return sum;
}
int main() {
int ... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 269 | 2 |
#include <iostream>
using namespace std;
bool isLeap(int y) {
if (y % 400 == 0)
return true;
if (y % 100 == 0)
return false;
if (y % 4 == 0)
return true;
return false;
}
int NumberOfDays(int y, int m, int d) {
int num = 0;
int mon[] = {0, 31, 28, 31, 30, 31, 30, 31, 30, 30, 31, 30, 31};
if ... | #include <iostream>
using namespace std;
bool isLeap(int y) {
if (y % 400 == 0)
return true;
if (y % 100 == 0)
return false;
if (y % 4 == 0)
return true;
return false;
}
int NumberOfDays(int y, int m, int d) {
int num = 0;
int mon[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
if ... | [["-", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13]] | 1 | 257 | 2 |
#include <cstdio>
bool isLeap(int year) {
if (year % 400 == 0)
return true;
if (year % 100 == 0)
return false;
return (year % 4 == 0);
}
long long dateserial(int year, int month, int day) {
static int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
long long res = day;
for (int i = 0; i... | #include <cstdio>
bool isLeap(int year) {
if (year % 400 == 0)
return true;
if (year % 100 == 0)
return false;
return (year % 4 == 0);
}
long long dateserial(int year, int month, int day) {
static int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
long long res = day;
for (int i = 0; i... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 284 | 4 |
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include ... | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include ... | [["-", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13]] | 1 | 337 | 2 |
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define FOR(i, c) \
for (__typeof((c).begin()) i =... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define FOR(i, c) \
for (__typeof((c).begin()) i =... | [["+", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 17, 29], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]] | 1 | 270 | 3 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
bool checkUru(const int y) {
if (y == 0)
return false;
if (y % 4 == 0) {
if (y % 100 == 0) {
if (y % 400 == 0) {
return true;
} else {
return false;
}
} else
return true;
} else
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
bool checkUru(const int y) {
// if(y%4==0&&y%100!=0){
// return true;
//}
// else if(y%400==0){
// return true;
//}
// else
// return false;
if (y == 0)
return false;
if (y % 4 == 0) {
if (y % 100 == 0) {
... | [["+", 49, 53, 54, 55, 0, 56, 0, 153, 0, 154], ["-", 15, 339, 51, 16, 31, 2, 3, 4, 0, 22], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22]] | 1 | 377 | 7 |
#include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {... | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {... | [["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 21]] | 1 | 334 | 2 |
#include <iostream>
using namespace std;
bool uru(int y) {
if (!(y % 400))
return true;
if (!(y % 100))
return false;
if (!(y % 4))
return true;
return false;
}
int day(int y, int m, int d) {
int res = 0;
int month[] = {31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30};
for (int i = 2000; i < y; i... | #include <iostream>
using namespace std;
bool uru(int y) {
if (!(y % 400))
return true;
if (!(y % 100))
return false;
if (!(y % 4))
return true;
return false;
}
int day(int y, int m, int d) {
int res = 0;
int month[] = {31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30};
for (int i = 0; i < y; i++)... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 289 | 2 |
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = ... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = ... | [["+", 0, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["-", 0, 16, 31, 23, 0, 16, 31, 16, 17, 106], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 17, 98], ["+", 0, 16, 31, 23, 0, 16, 31, 23, 0, 25], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 17, 60], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 12, 13]] | 1 | 316 | 6 |
#include <iostream>
using namespace std;
int fairfiled(int y, int m, int d) {
if (m < 3) {
--y;
m += 12;
}
return 365 * y + (y / 4) - (y / 100) + (y / 400) + (206 * (m + 1) / 10) + d -
428;
}
int main() {
int y1, m1, d1;
int y2, m2, d2;
int sum;
while (cin >> y1 >> m1 >> d1 >> y2 >> m2 ... | #include <iostream>
using namespace std;
int fairfiled(int y, int m, int d) {
if (m < 3) {
--y;
m += 12;
}
return 365 * y + (y / 4) - (y / 100) + (y / 400) + (306 * (m + 1) / 10) + d -
428;
}
int main() {
int y1, m1, d1;
int y2, m2, d2;
int sum;
while (cin >> y1 >> m1 >> d1 >> y2 >> m2 ... | [["-", 31, 16, 12, 23, 0, 16, 31, 16, 31, 13], ["+", 31, 16, 12, 23, 0, 16, 31, 16, 31, 13]] | 1 | 144 | 2 |
def uru(y):
return y % 4 == 0 and y % 100 != 0 or y % 400 == 0
def y_to_d(y):
ret = 0
for i in range(y):
if uru(i):
ret += 366
else:
ret += 365
return ret
month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
def m_to_d(y, m):
m -= 1
ret = 0
for... | def uru(y):
return y % 4 == 0 and y % 100 != 0 or y % 400 == 0
def y_to_d(y):
ret = 0
for i in range(y):
if uru(i):
ret += 366
else:
ret += 365
return ret
month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
def m_to_d(y, m):
m -= 1
ret = 0
for... | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 57, 15, 679, 12, 652, 3, 4, 0, 24], ["+", 0, 57, 15, 679, 12, 652, 3, 4, 0, 22], ["+", 0, 57, 15, 679, 12, 652, 3, 4, 0, 25]] | 5 | 210 | 5 |
function NotOne(arr) {
var cnt = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];
arr.forEach(function(v) { cnt[(v - 0)]++; });
var bad = [];
cnt.forEach(function(v, i) {
if (v >= 2)
bad.push(i);
});
var result = [];
arr.forEach(function(v, i) {
if (bad.indexOf(v) != -1)
result.push(i);
});
retur... | function NotOne(arr) {
var cnt = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];
arr.forEach(function(v) { cnt[(v - 0)]++; });
var bad = [];
cnt.forEach(function(v, i) {
if (v >= 2)
bad.push(i);
});
var result = [];
arr.forEach(function(v, i) {
if (bad.indexOf(v) != -1)
result.push(i);
});
retur... | [["+", 0, 1, 0, 564, 12, 16, 12, 557, 0, 44]] | 2 | 722 | 1 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while (n-- > 0) {
boolean[][] r = new boolean[9][9];
int[][] l = new int[9][9];
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while (n-- > 0) {
boolean[][] r = new boolean[9][9];
int[][] l = new int[9][9];
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; ... | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499]] | 3 | 571 | 2 |
#include <stdio.h>
int main(void) {
int i, j, k;
int board[9][9];
int n;
char ans[10][10];
scanf("%d", &n);
while (n--) {
for (i = 0; i < 9; i++) {
for (j = 0; j < 9; j++) {
scanf("%d", &board[i][j]);
}
}
for (i = 0; i < 9; i++) {
for (j = 0; j < 9; j++) {
an... | #include <stdio.h>
int main(void) {
int i, j, k;
int board[9][9];
int n;
char ans[10][10];
scanf("%d", &n);
while (n--) {
for (i = 0; i < 9; i++) {
for (j = 0; j < 9; j++) {
scanf("%d", &board[i][j]);
}
}
for (i = 0; i < 9; i++) {
for (j = 0; j < 9; j++) {
an... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 79], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 460 | 2 |
#include <stdio.h>
#include <string.h>
int main(void) {
int puzzle[9][9];
char flag[9][9];
int n;
int i, j, k, l;
scanf("%d", &n);
for (i = 0; i < n; i++) {
for (j = 0; j < 9; j++) {
for (k = 0; k < 9; k++) {
scanf("%d", &puzzle[j][k]);
}
}
memset(flag, ' ', sizeof(flag));
... | #include <stdio.h>
#include <string.h>
int main(void) {
int puzzle[9][9];
char flag[9][9];
int n;
int i, j, k, l;
scanf("%d", &n);
for (i = 0; i < n; i++) {
for (j = 0; j < 9; j++) {
for (k = 0; k < 9; k++) {
scanf("%d", &puzzle[j][k]);
}
}
memset(flag, ' ', sizeof(flag));
... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 20]] | 0 | 439 | 2 |
m[9][9];
x[9][9];
z[10];
main(n, i, j) {
for (scanf("%d", &n); n--; n > 1 ? puts("") : 1, memset(x, 0, 324)) {
for (i = 0; i < 9; i++)
for (j = 0; j < 9; j++)
scanf("%d", m[i] + j);
for (i = 0; i < 9; i++) {
memset(z, 0, 40);
for (j = 0; j < 9; j++)
z[m[i][j]]++;
for (j... | m[9][9];
x[9][9];
z[10];
main(n, i, j) {
for (scanf("%d", &n); n--; n ? puts("") : 1, memset(x, 0, 324)) {
for (i = 0; i < 9; i++)
for (j = 0; j < 9; j++)
scanf("%d", m[i] + j);
for (i = 0; i < 9; i++) {
memset(z, 0, 40);
for (j = 0; j < 9; j++)
z[m[i][j]]++;
for (j = 0... | [["-", 0, 7, 26, 34, 31, 41, 15, 16, 17, 47], ["-", 0, 7, 26, 34, 31, 41, 15, 16, 12, 13]] | 0 | 483 | 2 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
bool ok[9][9];
int m[9][9];
void reset(int *r) {
for (int i = 0; i < 10; ++i)
*(r + i) = 0;
}
void func(int x, int y) {
int cn[10] = {};
for (int i = x; i < x + 3; ++i)
for (int j = y; j < y + 3; ++j)
cn[m[i][j]]++;
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
bool ok[9][9];
int m[9][9];
void reset(int *r) {
for (int i = 0; i < 10; ++i)
*(r + i) = 0;
}
void func(int x, int y) {
int cn[10] = {};
for (int i = x; i < x + 3; ++i)
for (int j = y; j < y + 3; ++j)
cn[m[i][j]]++;
... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]] | 1 | 597 | 2 |
#include <cstdio>
using namespace std;
int main() {
int N;
for (scanf("%d", &N); N--;) {
char pz[9][12] = {};
char res[9][12] = {};
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
scanf(" %c", &pz[i][j]);
}
}
for (int i = 0; i < 9; i++) {
for (int j = 0; j ... | #include <cstdio>
using namespace std;
int main() {
int N;
for (scanf("%d", &N); N--;) {
char pz[9][12] = {};
char res[9][12] = {};
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
scanf(" %c", &pz[i][j]);
}
}
for (int i = 0; i < 9; i++) {
for (int j = 0; j ... | [["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 48], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 31, 22]] | 1 | 437 | 6 |
#include "bits/stdc++.h"
#include <unordered_map>
#include <unordered_set>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T> using Table = vector<vector<T>>;
const ld eps = 1e-9;
//// < "D:\D_Download\Visual Studio
///2015\Projects\programing_contest_c++\Debug\a.txt"
int m... | #include "bits/stdc++.h"
#include <unordered_map>
#include <unordered_set>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T> using Table = vector<vector<T>>;
const ld eps = 1e-9;
//// < "D:\D_Download\Visual Studio
///2015\Projects\programing_contest_c++\Debug\a.txt"
int m... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 453 | 2 |
#include <iostream>
using namespace std;
int main() {
int ms, ml;
while (cin >> ms >> ml) {
if (ms < 35.50)
ms = 0;
else if (ms < 37.50)
ms = 1;
else if (ms < 40.00)
ms = 2;
else if (ms < 43.00)
ms = 3;
else if (ms < 50.00)
ms = 4;
else if (ms < 55.00)
... | #include <iostream>
using namespace std;
int main() {
double ms, ml;
while (cin >> ms >> ml) {
if (ms < 35.50)
ms = 0;
else if (ms < 37.50)
ms = 1;
else if (ms < 40.00)
ms = 2;
else if (ms < 43.00)
ms = 3;
else if (ms < 50.00)
ms = 4;
else if (ms < 55.00)
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 99, 15, 339, 51, 74, 0, 24], ["+", 0, 99, 15, 339, 51, 74, 39, 77, 39, 40], ["+", 8, 9, 0, 99, 15, 339, 51, 74, 0, 25]] | 1 | 312 | 5 |
#include <iostream>
using namespace std;
int main() {
double ms, ml;
double s[7] = {35.50, 37.50, 40.00, 43.00, 50.00, 55.00, 70.00};
double l[7] = {71.00, 77.00, 83.00, 89.00, 105.00, 116.00, 148.00};
char r[7][4] = {"AAA", "AA", "A", "B", "C", "D", "NA"};
while (cin >> ms >> ml) {
int ss = 6, ll = 6... | #include <iostream>
using namespace std;
int main() {
double ms, ml;
double s[7] = {35.50, 37.50, 40.00, 43.00, 50.00, 55.00, 70.00};
double l[7] = {71.00, 77.00, 83.00, 89.00, 105.00, 116.00, 148.00};
char r[8][4] = {"AAA", "AA", "A", "B", "C", "D", "E", "NA"};
while (cin >> ms >> ml) {
int ss = 7, l... | [["-", 0, 43, 49, 50, 49, 80, 49, 80, 81, 13], ["+", 0, 43, 49, 50, 49, 80, 49, 80, 81, 13], ["+", 0, 43, 49, 50, 51, 83, 0, 5, 0, 62], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 21], ["+", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6], ["-", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 205 | 10 |
#include <iostream>
using namespace std;
int main(void) {
double a, b;
cin >> a >> b;
if (a < 35.5 && b < 71.0)
cout << "AAA" << endl;
else if (a < 37.5 && b < 77.0)
cout << "AA" << endl;
else if (a < 40.0 && b < 83.0)
cout << "A" << endl;
else if (a < 43.0 && b < 89.0)
cout << "B" << endl... | #include <iostream>
using namespace std;
int main(void) {
double a, b;
while (cin >> a >> b) {
if (a < 35.5 && b < 71.0)
cout << "AAA" << endl;
else if (a < 37.5 && b < 77.0)
cout << "AA" << endl;
else if (a < 40.0 && b < 83.0)
cout << "A" << endl;
else if (a < 43.0 && b < 89.0)
... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 168 | 6 |
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
#define MAX_CLASS 8
int check(double m, int type);
int main() {
double m500, m1000;
string cls[MAX_CLASS] = {"AAA", "AA", "A", "B", "C", "D", "D", "NA"};
while (cin >> m500 >> m1000) {
cout << cls[max(check(m500, 0), check(m1000... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
#define MAX_CLASS 8
int check(double m, int type);
int main() {
double m500, m1000;
string cls[MAX_CLASS] = {"AAA", "AA", "A", "B", "C", "D", "E", "NA"};
while (cin >> m500 >> m1000) {
cout << cls[max(check(m500, 0), check(m1000... | [["-", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6], ["+", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6], ["+", 0, 43, 49, 50, 49, 80, 81, 16, 17, 33], ["+", 0, 43, 49, 50, 49, 80, 81, 16, 12, 13]] | 1 | 211 | 4 |
#include <cstdio>
#include <string>
main() {
using namespace std;
int i, j;
string lv[8] = {"AAA", "AA", "A", "B", "C", "D", "E", "NA"};
double lvd5[7] = {35.5, 37.5, 40.0, 43.0, 50.0, 55.0, 70.0};
int lvd1[7] = {71, 77, 83, 89, 105, 116, 148};
double ind1, ind2;
while (~scanf("%lf %lf", &ind1, &ind2)) {
... | #include <cstdio>
#include <string>
main() {
using namespace std;
int i, j;
string lv[8] = {"AAA", "AA", "A", "B", "C", "D", "E", "NA"};
double lvd5[7] = {35.5, 37.5, 40.0, 43.0, 50.0, 55.0, 70.0};
int lvd1[7] = {71, 77, 83, 89, 105, 116, 148};
double ind1, ind2;
while (~scanf("%lf %lf", &ind1, &ind2)) {
... | [["-", 64, 2, 63, 118, 28, 69, 341, 342, 0, 22], ["+", 64, 2, 63, 118, 28, 69, 341, 342, 0, 22], ["-", 75, 2, 63, 118, 28, 69, 341, 342, 0, 22], ["+", 75, 2, 63, 118, 28, 69, 341, 342, 0, 22]] | 1 | 208 | 36 |
#include <iostream>
using namespace std;
int main() {
double time500, time1000;
while (cin >> time500 >> time1000) {
if (time500 < 35.5 && time1000 < 71.0)
cout << "AAA" << endl;
else if (time500 < 37.5 && time1000 < 77.0)
cout << "AA" << endl;
else if (time500 < 40.0 && time1000 < 83.0)
... | #include <iostream>
using namespace std;
int main() {
double time500, time1000;
while (cin >> time500 >> time1000) {
if (time500 < 35.5 && time1000 < 71.0)
cout << "AAA" << endl;
else if (time500 < 37.5 && time1000 < 77.0)
cout << "AA" << endl;
else if (time500 < 40.0 && time1000 < 83.0)
... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 171 | 2 |
#include <iostream>
using namespace std;
int main() {
double f, s;
while (cin >> f >> s) {
if (f < 35 && s < 71)
cout << "AAA";
else if (f < 37.5 && s < 77.0)
cout << "AA";
else if (f < 40.5 && s < 83.0)
cout << "A";
else if (f < 43.0 && s < 89.0)
cout << "B";
else if ... | #include <iostream>
using namespace std;
int main() {
double f, s;
while (cin >> f >> s) {
if (f < 35.5 && s < 71)
cout << "AAA";
else if (f < 37.5 && s < 77.0)
cout << "AA";
else if (f < 40.0 && s < 83.0)
cout << "A";
else if (f < 43.0 && s < 89.0)
cout << "B";
else i... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 159 | 4 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <stack>
#include <string>
#include <strstream>
#include <vector>
using namespace std;
int main() {
float a, b;
cin >> a >> b;
if (a < 35.5 && b < 71)
puts("AAA");
else if (a < 37.5 && b <... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <stack>
#include <string>
#include <strstream>
#include <vector>
using namespace std;
int main() {
float a, b;
while (cin >> a >> b) {
if (a < 35.5 && b < 71)
puts("AAA");
else if (a... | [["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 177 | 6 |
#include <iostream>
using namespace std;
int main() {
double a, b;
double A[] = {35.50, 37.50, 40.00, 43.00, 50.00, 55.00};
double B[] = {71, 77, 83, 89, 105, 116, 148};
string C[] = {"AAA", "AA", "A", "B", "C", "D", "E", "NA"};
while (cin >> a >> b) {
int i;
for (i = 0; i < 7; i++) {
if (a < ... | #include <iostream>
using namespace std;
int main() {
double a, b;
double A[] = {35.50, 37.50, 40.00, 43.00, 50.00, 55.00, 70.00};
double B[] = {71, 77, 83, 89, 105, 116, 148};
string C[] = {"AAA", "AA", "A", "B", "C", "D", "E", "NA"};
while (cin >> a >> b) {
int i;
for (i = 0; i < 7; i++) {
i... | [["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 21], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13]] | 1 | 156 | 2 |
# -*- coding:utf-8 -*-
import sys
t = [
{"name":"AAA","a":35.5,"b":71.0},
{"name":"AA" ,"a":37.5,"b":77.0},
{"name":"A" ,"a":40.0,"b":83.0},
{"name":"B" ,"a":43.0,"b":89.0},
{"name":"C" ,"a":50.0,"b":105.0},
{"name":"D" ,"a":55.0,"b":116.0},
{"name":"E" ,"a":70.5,"b":148.0},
]
while True:
s = sys.stdin.readlin... | # -*- coding:utf-8 -*-
import sys
t = [
{"name":"AAA","a":35.5,"b":71.0},
{"name":"AA" ,"a":37.5,"b":77.0},
{"name":"A" ,"a":40.0,"b":83.0},
{"name":"B" ,"a":43.0,"b":89.0},
{"name":"C" ,"a":50.0,"b":105.0},
{"name":"D" ,"a":55.0,"b":116.0},
{"name":"E" ,"a":70.0,"b":148.0},
]
while True:
s = sys.stdin.readlin... | [["-", 0, 662, 12, 634, 0, 680, 0, 569, 51, 531], ["+", 0, 662, 12, 634, 0, 680, 0, 569, 51, 531]] | 5 | 251 | 2 |
ans = []
while True:
lst = []
try:
lst = input().split()
except EOFError:
break
lst[0] = float(lst[0])
lst[1] = float(lst[1])
if lst[0] < 35.5 and lst[1] < 71.0:
ans.append("AAA")
elif lst[0] < 37.5 and lst[1] < 77.0:
ans.append("AA")
elif lst[0] < 40.5 an... | ans = []
while True:
lst = []
try:
lst = input().split()
except EOFError:
break
lst[0] = float(lst[0])
lst[1] = float(lst[1])
if lst[0] < 35.5 and lst[1] < 71.0:
ans.append("AAA")
elif lst[0] < 37.5 and lst[1] < 77.0:
ans.append("AA")
elif lst[0] < 40.0 an... | [["-", 0, 57, 75, 665, 15, 679, 31, 666, 0, 531], ["+", 0, 57, 75, 665, 15, 679, 31, 666, 0, 531]] | 5 | 230 | 2 |
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr = (input.trim()).split("\n");
var I = 0;
while (true) {
var n = Arr.shift() - 0;
if (n == 0)
break;
if (I != 0)
console.log("\n");
I++;
var rank = [];
for (var i = 0; i < n; i++) {
var arr = (Arr.shift()).split(" ");
var s... | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr = (input.trim()).split("\n");
var I = 0;
while (true) {
var n = Arr.shift() - 0;
if (n == 0)
break;
if (I != 0)
console.log("");
I++;
var rank = [];
for (var i = 0; i < n; i++) {
var arr = (Arr.shift()).split(" ");
var sco... | [["-", 64, 1, 0, 2, 3, 3, 0, 557, 0, 44]] | 2 | 245 | 1 |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
boolean first = true;
for (;;) {
int N = cin.nextInt();
if (N == 0) {
break;
}
if (first) {
... | import java.util.Arrays;
import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
boolean first = true;
for (;;) {
int N = cin.nextInt();
if (N == 0) {
break;
}
if (first) {
... | [["-", 64, 196, 0, 37, 0, 16, 31, 509, 500, 274], ["+", 64, 196, 0, 37, 0, 16, 31, 509, 500, 22], ["-", 64, 196, 0, 37, 0, 16, 12, 509, 500, 22], ["+", 64, 196, 0, 37, 0, 16, 12, 509, 500, 274]] | 3 | 348 | 4 |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] arg) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
String[] param = new String[10];
do {
for (int i = 0; i < n; i++) {
String name = in.next();
int point = in.n... | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] arg) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
String[] param = new String[10];
do {
for (int i = 0; i < n; i++) {
String name = in.next();
int point = in.n... | [["+", 0, 11, 12, 492, 3, 4, 0, 16, 31, 499], ["+", 0, 11, 12, 492, 3, 4, 0, 16, 17, 33]] | 3 | 215 | 2 |
#include <stdio.h>/*-1-0024 メンドくて放置▂▅▇█▓▒░(’ω’)░▒▓█▇▅▂うわああああああ*/
int main(void) {
int a[10 + 1], b[10 + 1], c[10 + 1], ten[10 + 1], i, j, n, max, cnt;
char moziretsu[20 + 1][10 + 1];
cnt = 0;
scanf("%d", &n);
while (n != 0) {
... | #include <stdio.h>
int main(void) {
int a[10 + 1], b[10 + 1], c[10 + 1], ten[10 + 1], i, j, n, max, cnt;
char moziretsu[10 + 1][20 + 1];
cnt = 0;
scanf("%d", &n);
while (n != 0) {
if (0 < cnt) {
printf("\n");
}
for (i = 0; i < n; i++) {
scanf("%s %d %d %d", moziretsu[i], &a[i], &b[i], ... | [["-", 0, 43, 49, 80, 49, 80, 81, 16, 31, 13], ["+", 0, 43, 49, 80, 49, 80, 81, 16, 31, 13], ["-", 8, 9, 0, 43, 49, 80, 81, 16, 31, 13], ["+", 8, 9, 0, 43, 49, 80, 81, 16, 31, 13]] | 0 | 289 | 4 |
#include <stdio.h>
#include <string.h>
int main(void) {
int w, l, d;
int n;
int i, j, temp;
int p[11];
char t[11][21], tempt[21];
scanf("%d", &n);
while (n != 0) {
for (i = 0; i < n; i++) {
scanf("%s %d %d %d", t[i], &w, &l, &d);
p[i] = w * 3 + d;
}
for (i = 0; i < n - 1; i++) {
... | #include <stdio.h>
#include <string.h>
int main(void) {
int w, l, d;
int n;
int i, j, temp;
int p[11];
char t[11][21], tempt[21];
scanf("%d", &n);
while (n != 0) {
for (i = 0; i < n; i++) {
scanf("%s %d %d %d", t[i], &w, &l, &d);
p[i] = w * 3 + d;
}
for (i = 0; i < n - 1; i++) {
... | [["-", 8, 9, 0, 7, 10, 11, 12, 16, 31, 22], ["-", 8, 9, 0, 7, 10, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 10, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 10, 11, 12, 16, 17, 33], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 47], ["+", 0, 7, 8, 9, 0, 7, ... | 0 | 289 | 10 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct Team {
string name;
int id;
int point;
bool operator<(const Team &r) const {
return point == r.point ? id < r.id : point > r.point;
}
};
int main() {
string name;
int n, a, b, c, i = 0;
while (cin >> n, n) {
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct Team {
string name;
int id;
int point;
bool operator<(const Team &r) const {
return point == r.point ? id < r.id : point > r.point;
}
};
int main() {
string name;
int n, a, b, c, i = 0;
while (cin >> n, n) {
... | [["-", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 0, 43, 49, 53, 54, 55, 0, 56, 39, 78]] | 1 | 215 | 2 |
#include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define mp make_pair
using namespace std;
struct Team {
int point;
int num;
string name;
bool operator<(const Team &t) const {
return point == t.point ? num < t.num... | #include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define mp make_pair
using namespace std;
struct Team {
int point;
int num;
string name;
bool operator<(const Team &t) const {
return point == t.point ? num < t.num... | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["-", 31, 16, 31, 16, 31, 16, 12, 118, 119, 120], ["+", 31, 16, 31, 16, 31, 16, 12, 118, 119, 120], ["-", 0, 1, 0, 16, 31, 16, 12, 118, 119, 120], ["+",... | 1 | 218 | 8 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include... | [["-", 3, 4, 0, 2, 3, 4, 0, 91, 17, 33]] | 1 | 507 | 1 |
#include <iostream>
#include <map>
using namespace std;
int main() {
int n, p = 0;
while (cin >> n, n) {
multimap<int, string, greater<int>> m;
if (p)
cout << endl;
p++;
while (n--) {
string s;
int a, b, c;
cin >> s >> a >> b >> c;
a = a * 3 + c;
m.insert(make_pai... | #include <iostream>
#include <map>
using namespace std;
int main() {
int n, p = 0;
while (cin >> n, n) {
multimap<int, string, greater<int>> m;
if (p)
cout << endl;
p++;
while (n--) {
string s;
int a, b, c;
cin >> s >> a >> b >> c;
a = a * 3 + c;
m.insert(make_pai... | [["-", 0, 16, 31, 16, 31, 16, 12, 103, 0, 125], ["+", 0, 16, 31, 16, 31, 16, 12, 103, 0, 125]] | 1 | 160 | 2 |
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) \
if (DBG) { \
cerr << #o << " " << o << endl; ... | #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) \
if (DBG) { \
cerr << #o << " " << o << endl; ... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 298 | 2 |
#include <iostream>
using namespace std;
typedef struct {
string name;
int score;
} Team;
int main(void) {
int n;
bool firstFlg = true;
while (cin >> n && n) {
if (!firstFlg)
cout << endl;
else
firstFlg = false;
Team t[n];
for (int i = 0; i < n; i++) {
int win, lose, draw... | #include <iostream>
using namespace std;
typedef struct {
string name;
int score;
} Team;
int main(void) {
int n;
bool firstFlg = true;
while (cin >> n && n) {
if (!firstFlg)
cout << endl;
else
firstFlg = false;
Team t[n];
for (int i = 0; i < n; i++) {
int win, lose, draw... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 240 | 2 |
#include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {... | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33]] | 1 | 221 | 2 |
#include <algorithm>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <string>
#include <vector>
using namespace std;
bool cmp(pair<int, string> a, pair<int, string> b) { return a.first > b.first; }
int main(void) {
bool b = false;
while (1) {
int a, n;
... | #include <algorithm>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <string>
#include <vector>
using namespace std;
bool cmp(pair<int, string> a, pair<int, string> b) { return a.first > b.first; }
int main(void) {
bool b = false;
while (1) {
int a, n;
... | [["-", 31, 16, 31, 16, 31, 16, 12, 118, 119, 120], ["+", 31, 16, 31, 16, 31, 16, 12, 118, 119, 120], ["-", 0, 1, 0, 16, 31, 16, 12, 118, 119, 120], ["+", 0, 1, 0, 16, 31, 16, 12, 118, 119, 120]] | 1 | 229 | 4 |
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, d = 0;
while (cin >> n, n) {
if (!d)
cout << endl;
int a, b, c, z[100], tmp;
string s[100], tmp2;
for (int i = 0; i < n; i++) {
cin >> s[i] >> a >> b >> c;
z[i] = a * 3 + c;
... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, d = 0;
while (cin >> n, n) {
if (d)
cout << endl;
int a, b, c, z[100], tmp;
string s[100], tmp2;
for (int i = 0; i < n; i++) {
cin >> s[i] >> a >> b >> c;
z[i] = a * 3 + c;
... | [["-", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111]] | 1 | 248 | 1 |
#include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define FOR(i, k, n) for (int i = (k); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define INF 114514810
#define ELEM(array) (sizeof(array) / sizeof *(array))
#define MAX_N 100
typedef unsigned int UINT;
typedef long long ll;
... | #include <iostream>
#include <map>
#include <queue>
#include <string>
using namespace std;
#define FOR(i, k, n) for (int i = (k); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define INF 114514810
#define ELEM(array) (sizeof(array) / sizeof *(array))
#define MAX_N 100
typedef unsigned int UINT;
typedef long long ll;
... | [["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 17, 131], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 753 | 6 |
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef pair<string, int> P;
map<string, int> m;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
queue<P> q;
q.push(P("0... | #include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef pair<string, int> P;
map<string, int> m;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
queue<P> q;
q.push(P("01... | [["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 22], ["+", 0, 16, 31, 16, 12, 69, 341, 342, 0, 22]] | 1 | 410 | 2 |
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, string> P;
int main() {
int d[4] = {-1, 1, -4, 1};
map<string, int> ans;
ans["01234567"] = 0;
queue<P> que;
que.push(P(0, "01234567"));
while (que.size()) {
P p = que.front();
que.pop();
int k = ans[p.second];
for (int i = 0;... | #include <bits/stdc++.h>
using namespace std;
using namespace std;
typedef pair<int, string> P;
int main() {
int d[4] = {-1, 1, -4, 4};
map<string, int> ans;
ans["01234567"] = 0;
queue<P> que;
que.push(P(0, "01234567"));
while (que.size()) {
P p = que.front();
que.pop();
int k = ans[p.second... | [["+", 36, 36, 36, 36, 0, 30, 0, 340, 0, 233], ["+", 36, 36, 36, 36, 0, 30, 0, 340, 0, 256], ["+", 36, 36, 36, 36, 0, 30, 0, 340, 0, 22], ["+", 36, 36, 36, 36, 0, 30, 0, 340, 0, 35], ["-", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13]] | 1 | 301 | 6 |
#define LOCAL
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <queue>
#define SIZE 50000
using namespace std;
int map[8];
int factor[8];
int result[SIZE];
int dir[] = {-1, 1, -4, 4};
int cantor() {
int ans = 0;
for (int i = 0; i < 8; i++) {
int num = 0;
for (int j = i + 1; j < 8; j++... | //#define LOCAL
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <queue>
#define SIZE 50000
using namespace std;
int map[8];
int factor[8];
int result[SIZE];
int dir[] = {-1, 1, -4, 4};
int cantor() {
int ans = 0;
for (int i = 0; i < 8; i++) {
int num = 0;
for (int j = i + 1; j < 8; j... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["-", 0, 14, 49, 53, 54, 55, 0, 56, 49, 22], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 49, 22], ["-", 0, 11, 12, 16, 31, 69, 341, 342, 0, 22], ["+", 0, 11, 12, 16, 31, 69, 341, 342, 0, 22]] | 1 | 641 | 6 |
require 'pry'
def to_xy(str, target)
str.chars.each_with_index do |s, i|
if target == s.to_i
x = i%4
y = i < 4 ? 0 : 1
return x, y, i
end
end
end
def move_zero(str, mx, my)
zx, zy, zi = to_xy(str, 0)
(1..7).each do |i|
sx, sy, si = to_xy(str, i)
if (zx + mx) == sx and (zy + m... | def to_xy(str, target)
str.chars.each_with_index do |s, i|
if target == s.to_i
x = i%4
y = i < 4 ? 0 : 1
return x, y, i
end
end
end
def move_zero(str, mx, my)
zx, zy, zi = to_xy(str, 0)
(1..7).each do |i|
sx, sy, si = to_xy(str, i)
if (zx + mx) == sx and (zy + my) == sy
... | [["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["-", 0, 493, 0, 652, 3, 4, 0, 557, 0, 62], ["-", 0, 493, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 428 | 4 |
puts $<.map{|l|(?0*(6-l.size)+l.chop).chars.map{|c|i=c.to_i
l="*=****"
l[i%5+3,0]=l[1-i/5,0]=" "
l.chars}.transpose.map{|a|a*""}<<?\n}*?\n | puts $<.map{|l|(?0*(6-l.size)+l.chop).chars.map{|c|i=c.to_i
l="*=****"
l[i%5+3,0]=l[1-i/5,0]=" "
l.chars}.transpose.map{|a|a<<?\n}*""}*?\n | [["+", 31, 652, 196, 196, 8, 734, 0, 738, 17, 151], ["+", 31, 652, 196, 196, 8, 734, 0, 738, 12, 125], ["+", 8, 734, 0, 738, 31, 652, 196, 196, 0, 46], ["-", 8, 734, 0, 738, 31, 652, 196, 196, 0, 46], ["-", 31, 652, 196, 196, 8, 734, 0, 738, 17, 151], ["-", 31, 652, 196, 196, 8, 734, 0, 738, 12, 125]] | 4 | 88 | 6 |
# AOJ 0128 Abacus
# Python3 2018.6.19 bal4u
abacus = [
[ '*', '*', '*', '*', '*', ' ', ' ', ' ', ' ', ' ' ],
[ ' ', ' ', ' ', ' ', ' ', '*', '*', '*', '*', '*' ],
[ '=', '=', '=', '=', '=', '=', '=', '=', '=', '=' ],
[ ' ', '*', '*', '*', '*', ' ', '*', '*', '*', '*' ],
[ '*', ' ', '*', '*', '*', '*', ' ', '*', '... | # AOJ 0128 Abacus
# Python3 2018.6.19 bal4u
abacus = [
[ '*', '*', '*', '*', '*', ' ', ' ', ' ', ' ', ' ' ],
[ ' ', ' ', ' ', ' ', ' ', '*', '*', '*', '*', '*' ],
[ '=', '=', '=', '=', '=', '=', '=', '=', '=', '=' ],
[ ' ', '*', '*', '*', '*', ' ', '*', '*', '*', '*' ],
[ '*', ' ', '*', '*', '*', '*', ' ', '*', '... | [["-", 0, 1, 0, 662, 12, 658, 8, 658, 8, 612], ["+", 0, 662, 12, 658, 8, 658, 8, 557, 0, 654], ["+", 0, 662, 12, 658, 8, 658, 8, 557, 0, 655], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 654], ["+... | 5 | 491 | 8 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
private static BufferedReader br = null;
static { br = new BufferedReader(new InputStreamReader(System.in)); }
/**
* @param args
*/
public static void main(String[] args) {
int cc = 0;
... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
private static BufferedReader br = null;
static { br = new BufferedReader(new InputStreamReader(System.in)); }
/**
* @param args
*/
public static void main(String[] args) {
int cc = 0;
... | [["-", 75, 196, 0, 1, 0, 11, 12, 16, 17, 98], ["+", 75, 196, 0, 1, 0, 11, 12, 16, 17, 106]] | 3 | 1,267 | 2 |
#include <math.h>
#include <stdio.h>
typedef struct {
int x;
int y;
int r;
} WALL;
// 内積
#define dotProduct(x1, y1, x2, y2) ((x1 * x2) + (y1 * y2))
// 円の中に点があるかどうか
#define inCircle(x1, y1, c) \
(pow(c.x - x1, 2) + pow(c.y - y1, 2) < c.r * c.r ? 1 : 0)
int ju... | #include <math.h>
#include <stdio.h>
typedef struct {
int x;
int y;
int r;
} WALL;
// 内積
#define dotProduct(x1, y1, x2, y2) ((x1 * x2) + (y1 * y2))
// 円の中に点があるかどうか
#define inCircle(x1, y1, c) \
(pow(c.x - x1, 2) + pow(c.y - y1, 2) < c.r * c.r ? 1 : 0)
int ju... | [["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 106], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 31, 22]] | 0 | 430 | 4 |
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
const double EPS = 1e-10;
double add(double a, double b) {
// if(abs(a+b)<EPS*(abs(a)+abs(b)))return 0;
return a + b;
}
typedef struct Vec {
double x, y;
Vec() {}
Vec(double x, double y) : x(x), y(y) {}
Vec operator+(Vec v) { re... | #include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
const double EPS = 1e-10;
double add(double a, double b) {
// if(abs(a+b)<EPS*(abs(a)+abs(b)))return 0;
return a + b;
}
typedef struct Vec {
double x, y;
Vec() {}
Vec(double x, double y) : x(x), y(y) {}
Vec operator+(Vec v) { re... | [["-", 64, 37, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 2, 3, 4, 0, 16, 31, 118, 28, 22], ["+", 0, 2, 3, 4, 0, 16, 31, 118, 17, 131], ["+", 0, 2, 3, 4, 0, 16, 31, 118, 119, 120]] | 1 | 619 | 4 |
// 36
#include <cmath>
#include <complex>
#include <iostream>
using namespace std;
typedef complex<double> P;
double cr(P a, P b) { return a.real() * b.imag() - a.imag() * b.real(); }
int main() {
for (int n; cin >> n, n;) {
P w[100];
double r[100];
for (int i = 0; i < n; i++) {
double x, y;
... | // 36
#include <cmath>
#include <complex>
#include <iostream>
using namespace std;
typedef complex<double> P;
double cr(P a, P b) { return a.real() * b.imag() - a.imag() * b.real(); }
int main() {
for (int n; cin >> n, n;) {
P w[100];
double r[100];
for (int i = 0; i < n; i++) {
double x, y;
... | [["-", 51, 16, 12, 16, 31, 16, 12, 2, 63, 22], ["-", 12, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 12, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 31, 16, 12, 2, 3, 4, 0, 2, 63, 22]] | 1 | 380 | 4 |
#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
int main() {
int i, j, n, m, f;
int a, b, c, d, r, x1, x2, y1, y2, mx[101], my[101], mr[101];
vector<int> tx, ty, sx, sy;
while (cin >> n) {
if (n == 0)
break;
for (i = 0; i < n; i++)
cin >> mx[i] >> my[i] >> mr[... | #include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
int main() {
int i, j, n, m, f;
int a, b, c, d, r, x1, x2, y1, y2, mx[101], my[101], mr[101];
vector<int> tx, ty, sx, sy;
while (cin >> n) {
if (n == 0)
break;
for (i = 0; i < n; i++)
cin >> mx[i] >> my[i] >> mr[... | [["+", 12, 16, 31, 16, 31, 16, 31, 16, 31, 13], ["+", 12, 16, 31, 16, 31, 16, 31, 16, 17, 48]] | 1 | 489 | 2 |
#include <bits/stdc++.h>
using namespace std;
typedef complex<double> P;
typedef pair<double, P> C;
vector<C> circles;
#define FST first
#define SND second
typedef pair<P, P> S;
#define EPS (1e-5)
double dot(P a, P b) { return a.real() * b.real() + a.imag() * b.imag(); }
double cross(P a, P b) { return a.real() * b.... | #include <bits/stdc++.h>
using namespace std;
typedef complex<double> P;
typedef pair<double, P> C;
vector<C> circles;
#define FST first
#define SND second
typedef pair<P, P> S;
#define EPS (1e-5)
double dot(P a, P b) { return a.real() * b.real() + a.imag() * b.imag(); }
double cross(P a, P b) { return a.real() * b.... | [["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 72], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 22], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 17, 72], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 12, 22]] | 1 | 482 | 6 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> P;... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> P;... | [["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 787 | 2 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
int n;
int i, j = 0, k = 30;
char az[26];
char str[1025];
char queue[60];
scanf("%d", &n);
for (i = 0; i < n; i++) {
k = 30;
memset(az, 0, 26);
memset(str, 0, 1025);
memset(queue, 0, 60);
scanf("%s", str);
for ... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
int n;
int i, j = 0, k = 30;
char az[26];
char str[1025];
char queue[60];
scanf("%d", &n);
for (i = 0; i < n; i++) {
k = 30;
memset(az, 0, 26);
memset(str, 0, 1025);
memset(queue, 0, 60);
scanf("%s", str);
for ... | [["-", 0, 7, 8, 9, 0, 7, 10, 11, 31, 22], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 31, 22], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 7, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 7, 8, 9, 0, 7, 26, 27, 28, 22], ["-", 8, 9, 0, 57, 15, 23, 0, 69, 71, 22], ["+", 8, 9, 0, 57, 15, 23, 0, ... | 0 | 270 | 10 |
#include <stdio.h>
#include <string.h>
int main(void) {
int i, j, k;
char map[8][9];
char cmap[8][9];
for (i = 0; i < 8; ++i) {
scanf("%s", map[i]);
}
for (i = 1; i < 4; ++i) {
memcpy(cmap, map, sizeof(map));
for (j = 0; j < 8; ++j) {
for (k = 0; k < 8; ++k) {
map[j][k] = cmap[... | #include <stdio.h>
#include <string.h>
int main(void) {
int i, j, k;
char map[8][9];
char cmap[8][9];
for (i = 0; i < 8; ++i) {
scanf("%s", map[i]);
}
for (i = 1; i < 4; ++i) {
memcpy(cmap, map, sizeof(map));
for (j = 0; j < 8; ++j) {
for (k = 0; k < 8; ++k) {
map[j][k] = cmap[... | [["-", 0, 7, 8, 9, 0, 7, 10, 11, 31, 22], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 31, 22], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 7, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 7, 8, 9, 0, 7, 26, 27, 28, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 69, 71, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 69, 71... | 0 | 181 | 8 |
#include <stdio.h>
int main(int argc, const char *argv[]) {
int x, y;
char data[8][8];
for (x = 0; x < 8; x++) {
for (y = 0; y < 8; y++) {
scanf("%c", &data[x][y]);
}
getchar();
}
printf("90\n");
for (x = 0; x < 8; x++) {
for (y = 7; y >= 0; y--) {
printf("%c", data[y][x]);
... | #include <stdio.h>
int main(int argc, const char *argv[]) {
int x, y;
char data[8][8];
for (x = 0; x < 8; x++) {
for (y = 0; y < 8; y++) {
scanf("%c", &data[x][y]);
}
getchar();
}
printf("90\n");
for (x = 0; x < 8; x++) {
for (y = 7; y >= 0; y--) {
printf("%c", data[y][x]);
... | [["-", 0, 2, 3, 4, 0, 69, 28, 69, 71, 22], ["+", 0, 2, 3, 4, 0, 69, 28, 69, 71, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 69, 71, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 69, 71, 22]] | 0 | 264 | 4 |
#include <stdio.h>
#include <string.h>
int rotate(char pat[8][9]) {
char bitmap[8][9];
int x, y;
for (x = 0; x < 8; x++) {
for (y = 0; y < 8; y++) {
bitmap[x][7 - y] = pat[y][x];
}
}
memcpy(pat, bitmap, sizeof(bitmap));
return 0;
}
int main(void) {
char pat[8][9];
int i;
for (i = 0; i ... | #include <stdio.h>
#include <string.h>
int rotate(char pat[8][9]) {
char bitmap[8][9] = {0};
int x, y;
for (x = 0; x < 8; x++) {
for (y = 0; y < 8; y++) {
bitmap[x][7 - y] = pat[y][x];
}
}
memcpy(pat, bitmap, sizeof(bitmap));
return 0;
}
int main(void) {
char pat[8][9];
int i;
for (i =... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 45], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 46]] | 0 | 261 | 4 |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
char c[8][8];
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
cin >> c[i][j];
}
}
cout << 90 << endl;
for (int i = 0; i < 8; i++) {
for (int j = 0; ... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
char c[8][8];
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
cin >> c[i][j];
}
}
cout << 90 << endl;
for (int i = 0; i < 8; i++) {
for (int j = 0; ... | [["-", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["-", 0, 16, 12, 69, 341, 342, 0, 16, 12, 22], ["+", 0, 16, 12, 69, 341, 342, 0, 16, 12, 22]] | 1 | 249 | 4 |
#include <algorithm>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define reep(i, a, b) for (int i = (a); i ... | #include <algorithm>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define reep(i, a, b) for (int i = (a); i ... | [["-", 12, 69, 28, 69, 341, 342, 0, 16, 12, 22], ["+", 12, 69, 28, 69, 341, 342, 0, 16, 12, 22], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["-", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["-", 0, 16, 12, 69, 341, 342, 0, 16, 1... | 1 | 332 | 8 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ... | [["-", 12, 69, 28, 69, 341, 342, 0, 16, 12, 22], ["+", 12, 69, 28, 69, 341, 342, 0, 16, 12, 22], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["-", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["-", 0, 16, 12, 69, 341, 342, 0, 16, 1... | 1 | 238 | 8 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char c[8][8];
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
cin >> c[i][j];
}
}
cout << "90" << endl;
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
cout << c[7 - j][i];
}
cout ... | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char c[8][8];
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
cin >> c[i][j];
}
}
cout << "90" << endl;
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
cout << c[7 - j][i];
}
cout ... | [["-", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["+", 12, 69, 28, 69, 341, 342, 0, 16, 31, 13], ["+", 12, 69, 28, 69, 341, 342, 0, 16, 17, 33], ["+", 12, 69, 28, 69, 341, 342, 0, 16, 12, 22], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["+", 0, 16, 12, 69, 341, 342, 0, 16, 31, 13], ["+", 0, 16, 12, 69, 341, 342, 0, 16... | 1 | 234 | 8 |
#include <iostream>
using namespace std;
char x[10][10];
char y[10][10];
void TheRotate90() {
for (int j = 0; j < 8; j++) {
for (int k = 0; k < 8; k++) {
y[k][7 - j] = x[j][k];
}
}
}
int main() {
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
cin >> x[i][j];
}
}
for... | #include <iostream>
using namespace std;
char x[10][10];
char y[10][10];
void TheRotate90() {
for (int j = 0; j < 8; j++) {
for (int k = 0; k < 8; k++) {
y[k][7 - j] = x[j][k];
}
}
}
int main() {
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
cin >> x[i][j];
}
}
for... | [["-", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 223 | 2 |
#include <bits/stdc++.h>
using namespace std;
#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(), (r).end()
#define gsort(st, en) sort((st), (en), greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout << #x << ": " ... | #include <bits/stdc++.h>
using namespace std;
#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(), (r).end()
#define gsort(st, en) sort((st), (en), greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout << #x << ": " ... | [["-", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["-", 0, 16, 12, 69, 341, 342, 0, 16, 12, 22], ["+", 0, 16, 12, 69, 341, 342, 0, 16, 12, 22], ["-", 12, 69, 28, 69, 341, 342, 0, 16, 12, 22], ["+", 12, 69, 28, 69, 341, 342, 0, 16, 12, 22], ["-", 0, 1, 0, 16, 12, 69, 341, 342... | 1 | 542 | 8 |
#include <bits/stdc++.h>
#define range(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, b) range(i, 0, b)
#define itrep(it, a) for (it = (a).begin(); it != (a).end(); it++)
#define all(a) (a).begin(), (a).end()
#define debug(x) cout << "debug " << x << endl;
#define INF (1 << 30)
using namespace std;
int main()... | #include <bits/stdc++.h>
#define range(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, b) range(i, 0, b)
#define itrep(it, a) for (it = (a).begin(); it != (a).end(); it++)
#define all(a) (a).begin(), (a).end()
#define debug(x) cout << "debug " << x << endl;
#define INF (1 << 30)
using namespace std;
int main()... | [["-", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22]] | 1 | 227 | 4 |
#include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
string s[8];
r(i, 8) cin >> s[i];
cout << 90 << endl;
r(i, 8) {
r(j, 8) cout << s[7 - i][j];
cout << endl;
}
cout << 180 << endl;
r(i, 8) {
r(j, 8) cout << s[7 - i][7 - j];
cout << endl;
... | #include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
string s[8];
r(i, 8) cin >> s[i];
cout << 90 << endl;
r(i, 8) {
r(j, 8) cout << s[7 - j][i];
cout << endl;
}
cout << 180 << endl;
r(i, 8) {
r(j, 8) cout << s[7 - i][7 - j];
cout << endl;
... | [["-", 12, 69, 28, 69, 341, 342, 0, 16, 12, 22], ["+", 12, 69, 28, 69, 341, 342, 0, 16, 12, 22], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["-", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["-", 0, 16, 12, 69, 341, 342, 0, 16, 1... | 1 | 153 | 8 |
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include ... | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include ... | [["-", 0, 7, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]] | 1 | 223 | 4 |
#include <cstring>
#include <iostream>
int main() {
char map[8][8], t_m[8][8];
for (int i = 0; i < 8; i++) {
std::cin >> map[i];
}
for (int i = 1; i < 4; i++) {
//ツ角ツ度ツ閉ェ(ツ9ツ0ツ,ツ1ツ8ツ0ツ,ツ2ツ7ツ0)ツ嘉アツ転ツつオツつスツ配ツ療アツづーツ催ャツづゥ
for (int y = 0; y < 8; y++) {
for (int x = 0; x < 8; x++) {
t_m[7 -... | #include <cstring>
#include <iostream>
int main() {
char map[8][8], t_m[8][8];
for (int i = 0; i < 8; i++) {
std::cin >> map[i];
}
for (int i = 1; i < 4; i++) {
//ツ角ツ度ツ閉ェ(ツ9ツ0ツ,ツ1ツ8ツ0ツ,ツ2ツ7ツ0)ツ嘉アツ転ツつオツつスツ配ツ療アツづーツ催ャツづゥ
for (int y = 0; y < 8; y++) {
for (int x = 0; x < 8; x++) {
t_m[x][... | [["-", 31, 69, 28, 69, 341, 342, 0, 16, 31, 13], ["-", 31, 69, 28, 69, 341, 342, 0, 16, 17, 33], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 31, 13], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33]] | 1 | 195 | 4 |
#include <iostream>
using namespace std;
string b[8];
int main() {
for (int i = 0; i < 8; i++)
cin >> b[i];
cout << 90 << endl;
for (int i = 0; i < 8; i++) {
for (int j = 7; j >= 0; j--) {
cout << b[i][j];
}
cout << endl;
}
cout << 180 << endl;
for (int i = 7; i >= 0; i--) {
for (i... | #include <iostream>
using namespace std;
string b[8];
int main() {
for (int i = 0; i < 8; i++)
cin >> b[i];
cout << 90 << endl;
for (int i = 0; i < 8; i++) {
for (int j = 7; j >= 0; j--) {
cout << b[j][i];
}
cout << endl;
}
cout << 180 << endl;
for (int i = 7; i >= 0; i--) {
for (i... | [["-", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22]] | 1 | 195 | 8 |
#include <iostream>
using namespace std;
int main() {
char mat[8][8];
for (int i = 0; i < 8; i++)
for (int j = 0; j < 8; j++)
cin >> mat[i][j];
cout << "90" << endl;
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
cout << mat[8 - i - 1][j];
}
cout << endl;
}
cout ... | #include <iostream>
using namespace std;
int main() {
char mat[8][8];
for (int i = 0; i < 8; i++)
for (int j = 0; j < 8; j++)
cin >> mat[i][j];
cout << "90" << endl;
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
cout << mat[8 - j - 1][i];
}
cout << endl;
}
cout ... | [["-", 28, 69, 341, 342, 0, 16, 31, 16, 12, 22], ["+", 28, 69, 341, 342, 0, 16, 31, 16, 12, 22], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["-", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["-", 12, 69, 341, 342, 0, 16, 31, 16, ... | 1 | 240 | 8 |
#include <iostream>
using namespace std;
int func1(int n) { return n; }
int func2(int n) { return 7 - n; }
void output(char map[][8], int dir) {
int angle = dir * 90;
int i, j;
int *p1, *p2;
int (*f1)(int), (*f2)(int);
switch (dir) {
case 1:
f1 = &func2;
f2 = &func1;
p1 = &j;
p2 = &i;
... | #include <iostream>
using namespace std;
int func1(int n) { return n; }
int func2(int n) { return 7 - n; }
void output(char map[][8], int dir) {
int angle = dir * 90;
int i, j;
int *p1, *p2;
int (*f1)(int), (*f2)(int);
switch (dir) {
case 1:
f1 = &func2;
f2 = &func1;
p1 = &j;
p2 = &i;
... | [["-", 28, 69, 341, 342, 0, 2, 3, 4, 0, 22], ["+", 341, 342, 0, 2, 3, 4, 0, 66, 17, 48], ["+", 341, 342, 0, 2, 3, 4, 0, 66, 28, 22], ["-", 12, 69, 341, 342, 0, 2, 3, 4, 0, 22]] | 1 | 300 | 6 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define mp... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define mp... | [["-", 0, 11, 31, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 11, 31, 69, 28, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["-", 0, 11, 12, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 11, 12, 69, 28, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 2... | 1 | 346 | 8 |
m=[input() for _ in range(8)]
for i in range(3):
m=list(zip(*m[::-1]))
print(90*i)
for x in m:
print(''.join(x)) | m=[input() for _ in range(8)]
for i in range(3):
m=list(zip(*m[::-1]))
print(90*(i+1))
for x in m:
print(''.join(x)) | [["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 24], ["+", 3, 4, 0, 657, 12, 23, 0, 657, 17, 72], ["+", 3, 4, 0, 657, 12, 23, 0, 657, 12, 612], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25]] | 5 | 59 | 4 |
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr = (input.trim()).split("\n").map(Number);
var n = Arr.shift();
var sum = 0;
for (var i = 0; i < Arr.length; i++) {
sum += Arr[i];
}
console.log(Math.floor(sum / N)); | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr = (input.trim()).split("\n").map(Number);
var n = Arr.shift();
var sum = 0;
for (var i = 0; i < n; i++) {
sum += Arr[i];
}
console.log(Math.floor(sum / n)); | [["-", 0, 7, 15, 1, 0, 16, 12, 558, 500, 22], ["-", 0, 7, 15, 1, 0, 16, 12, 558, 0, 131], ["-", 0, 7, 15, 1, 0, 16, 12, 558, 559, 560], ["+", 0, 493, 0, 7, 15, 1, 0, 16, 12, 22], ["-", 3, 3, 0, 2, 3, 3, 0, 16, 12, 22], ["+", 3, 3, 0, 2, 3, 3, 0, 16, 12, 22]] | 2 | 97 | 6 |
#include <stdio.h>
int main(void) {
long long int N;
scanf("%lld", &N);
int i;
long long int sum = 0;
for (i = 0; i < N; i++) {
int n;
scanf("%lld", &n);
sum += n;
}
printf("%lld\n", sum / N);
return 0;
}
| #include <stdio.h>
int main(void) {
long long int N;
scanf("%lld", &N);
int i;
long long int sum = 0;
for (i = 0; i < N; i++) {
long long int n;
scanf("%lld", &n);
sum += n;
}
printf("%lld\n", sum / N);
return 0;
}
| [["+", 0, 7, 8, 9, 0, 43, 39, 86, 0, 96]] | 0 | 81 | 2 |
#include <stdio.h>
int main(void) {
unsigned long long n;
unsigned long long num;
unsigned long long i;
unsigned long long sum;
scanf("%lld", &n);
sum = 0;
for (i = 0; i < num; i++) {
scanf("%lld", &num);
sum += num;
}
printf("%lld\n", sum / n);
return 0;
} | #include <stdio.h>
int main(void) {
unsigned long long n;
unsigned long long num;
unsigned long long i;
unsigned long long sum;
scanf("%lld", &n);
sum = 0;
for (i = 0; i < n; i++) {
scanf("%lld", &num);
sum += num;
}
printf("%lld\n", sum / n);
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 0 | 87 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i+... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i+... | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22]] | 1 | 172 | 2 |
#include <stdio.h>
int n, a;
long long s;
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%d", &a), s += a;
printf("%lld\n", s / a);
return 0;
} | #include <stdio.h>
int n, a;
long long s;
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%d", &a), s += a;
printf("%lld\n", s / n);
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22]] | 1 | 70 | 2 |
#include <iostream>
using namespace std;
int main() {
int n;
int p[9][9];
char map[9][9];
int check[10];
cin >> n;
while (n) {
n--;
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
cin >> p[i][j];
map[i][j] = ' ';
}
}
for (int i = 0; i < 9; i++) {
... | #include <iostream>
using namespace std;
int main() {
int n;
int p[9][9];
char map[9][9];
int check[10];
cin >> n;
while (n) {
n--;
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
cin >> p[i][j];
map[i][j] = ' ';
}
}
for (int i = 0; i < 9; i++) {
... | [["+", 8, 9, 0, 52, 8, 9, 0, 57, 0, 121], ["+", 0, 52, 8, 9, 0, 57, 15, 339, 0, 24], ["+", 0, 52, 8, 9, 0, 57, 15, 339, 51, 22], ["+", 0, 52, 8, 9, 0, 57, 15, 339, 0, 25]] | 1 | 540 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.