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 <stdio.h>
int main(void) {
int num;
float w, h, bmi;
while (scanf("%d,%lf,%lf", &num, &w, &h) != EOF) {
bmi = w / h / h;
if (bmi >= 25)
printf("%d\n", num);
}
return 0;
} | #include <stdio.h>
int main(void) {
int num;
double w, h, bmi;
while (scanf("%d,%lf,%lf", &num, &w, &h) != EOF) {
bmi = w / h / h;
if (bmi >= 25.0)
printf("%d\n", num);
}
return 0;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 68 | 4 |
#include <stdio.h>
int main(void) {
int i, n, m, BMI;
double w, h;
while (scanf("%d, %lf, %lf", &i, &w, &h) != EOF) {
BMI = w / h / h;
if (BMI >= 25) {
printf("%d", i);
}
}
return 0;
} | #include <stdio.h>
int main(void) {
int i, n, m, BMI;
double w, h;
while (scanf("%d, %lf, %lf", &i, &w, &h) != EOF) {
BMI = w / h / h;
if (BMI >= 25) {
printf("%d\n", i);
}
}
return 0;
} | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 73 | 1 |
#include <stdio.h>
int main() {
int num;
double wei, high;
while (scanf("%d,%f,%f", &num, &wei, &high) != EOF) {
if (wei / (high * high) >= 25.0)
printf("%d\n", num);
}
return 0;
} | #include <stdio.h>
int main() {
int num;
double wei, high;
while (scanf("%d,%lf,%lf", &num, &wei, &high) != EOF) {
if (wei / (high * high) >= 25.0)
printf("%d\n", num);
}
return 0;
} | [["-", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6]] | 0 | 63 | 2 |
#include <stdio.h>
int main(void) {
int no;
double w, h, bmi;
int cnt = 0;
while (scanf("%d,%lf,%lf", &no, &w, &h) != EOF) {
bmi = w / h / h;
if (bmi >= 25.0) {
printf("%n\n", no);
cnt++;
}
}
if (cnt == 0)
printf("該当なし\n");
return 0;
} | #include <stdio.h>
int main(void) {
int no;
double w, h, bmi;
int cnt = 0;
while (scanf("%d,%lf,%lf", &no, &w, &h) != EOF) {
bmi = w / h / h;
if (bmi >= 25.0) {
printf("%d\n", no);
cnt++;
}
}
if (cnt == 0)
printf("該当なし\n");
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 92 | 2 |
#include <stdio.h>
int main(void) {
int n;
double g, m;
while (scanf("%d,%lf,%lf", &n, &g, &m) != EOF) {
if (25 <= g / m * m) {
printf("%d\n", n);
}
}
return 0;
} | #include <stdio.h>
int main(void) {
int n;
double g, m;
while (scanf("%d,%lf,%lf", &n, &g, &m) != EOF) {
if (25 <= g / m / m) {
printf("%d\n", n);
}
}
return 0;
} | [["-", 0, 57, 15, 23, 0, 16, 12, 16, 17, 48], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 85]] | 0 | 64 | 2 |
#include <stdio.h>
int main() {
double num, weight, height;
while (scanf("%d,%lf,%lf", &num, &weight, &height) != EOF) {
if ((weight / (height * height)) >= 25.0)
printf("%d\n", num);
}
return 0;
} | #include <stdio.h>
int main() {
int num;
double weight, height;
while (scanf("%d,%lf,%lf", &num, &weight, &height) != EOF) {
if ((weight / (height * height)) >= 25.0)
printf("%d\n", num);
}
return 0;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35]] | 0 | 64 | 5 |
#include <stdio.h>
int main(void) {
int num;
double kg, m;
while (scanf("%d,%lf,%lf", &num, &kg, &m) != EOF) {
if (kg / (m * m) >= 25) {
printf("%d", num);
}
}
return 0;
} | #include <stdio.h>
int main(void) {
int num;
double kg, m;
while (scanf("%d,%lf,%lf", &num, &kg, &m) != EOF) {
if (kg / (m * m) >= 25) {
printf("%d\n", num);
}
}
return 0;
} | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 65 | 1 |
#include <stdio.h>
int main() {
int id;
double h, w, bmi;
while (scanf("%d,%lf,%lf", &id, &w, &h) != EOF) {
bmi = w / h * h;
if (bmi >= 25.0)
printf("%d\n", id);
}
return 0;
} | #include <stdio.h>
int main() {
int id;
double h, w, bmi;
while (scanf("%d,%lf,%lf", &id, &w, &h) != EOF) {
bmi = w / h / h;
// printf("%f\n",bmi);
if (bmi >= 25.0)
printf("%d\n", id);
}
return 0;
} | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85]] | 1 | 67 | 2 |
#include <cmath>
#include <iostream>
using namespace std;
double BMI(double height, double weight) {
return weight / pow(height / 100.0, 2);
}
int main() {
const int DATASETS = 1000;
int Number[DATASETS], C = 0;
double H[DATASETS], W[DATASETS];
char ch;
while (cin >> Number[C] >> ch >> H[C] >> ch >> W[... | #include <cmath>
#include <iostream>
using namespace std;
double BMI(double height, double weight) {
return weight / pow(height / 100.0, 2);
}
int main() {
const int DATASETS = 1000;
int Number[DATASETS], C = 0;
double H[DATASETS], W[DATASETS];
char ch;
while (cin >> Number[C] >> ch >> W[C] >> ch >> H[... | [["-", 51, 16, 31, 16, 31, 16, 12, 69, 28, 22], ["+", 51, 16, 31, 16, 31, 16, 12, 69, 28, 22], ["-", 0, 52, 15, 339, 51, 16, 12, 69, 28, 22], ["+", 0, 52, 15, 339, 51, 16, 12, 69, 28, 22]] | 1 | 144 | 4 |
#include <iostream>
using namespace std;
int num;
double h, w;
char a;
int main() {
while (cin >> num >> a >> h >> a >> w) {
if (h * h * 25 <= w) {
cout << num << endl;
}
}
} | #include <iostream>
using namespace std;
int num;
double h, w;
char a;
int main() {
while (cin >> num >> a >> w >> a >> h) {
if (h * h * 25 <= w) {
cout << num << endl;
}
}
} | [["-", 15, 339, 51, 16, 31, 16, 31, 16, 12, 22], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22]] | 1 | 57 | 4 |
#include <cstdio>
using namespace std;
int main() {
int no;
double w, h, bmi;
while (~scanf("%lf,%lf,%lf", &no, &w, &h)) {
if (w / h / h >= 25)
printf("%d\n", no);
}
return 0;
} | #include <cstdio>
using namespace std;
int main() {
int no;
double w, h, bmi;
while (~scanf("%d,%lf,%lf", &no, &w, &h)) {
if (w / h / h >= 25)
printf("%d\n", no);
}
return 0;
} | [["-", 51, 91, 28, 2, 3, 4, 0, 5, 0, 6], ["+", 51, 91, 28, 2, 3, 4, 0, 5, 0, 6]] | 1 | 66 | 2 |
#include <iostream>
using namespace std;
int main() {
double bmi;
int s;
double w, h;
while (scanf("%d,%lf,%lf", &s, &w, &h) + 1) {
bmi = w / (h * h);
if (bmi >= 25) {
cout << s;
}
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
double bmi;
int s;
double w, h;
while (scanf("%d,%lf,%lf", &s, &w, &h) + 1) {
bmi = w / (h * h);
if (bmi >= 25) {
cout << s << endl;
}
}
return 0;
} | [["+", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22]] | 1 | 70 | 2 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
double s, w, h;
char g;
while (cin >> s >> g >> w >> g >> h) {
if (w / (s * s) >= 25)
cout << s << endl;
}
return 0;
} | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
double s, w, h;
char g;
while (cin >> s >> g >> w >> g >> h) {
if (w / (h * h) >= 25)
cout << s << endl;
}
return 0;
} | [["-", 51, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["+", 51, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["-", 51, 16, 31, 16, 12, 23, 0, 16, 12, 22], ["+", 51, 16, 31, 16, 12, 23, 0, 16, 12, 22]] | 1 | 67 | 4 |
import java.util.*;
class Main {
Scanner sc = new Scanner(System.in);
public void run() {
while (sc.hasNextLine()) {
char[] str = sc.nextLine().toCharArray();
StringBuilder res = new StringBuilder();
for (int i = 0; i < str.length; i++) {
if (str[i] == '@') {
i++;
... | import java.util.*;
class Main {
Scanner sc = new Scanner(System.in);
public void run() {
while (sc.hasNextLine()) {
char[] str = sc.nextLine().toCharArray();
StringBuilder res = new StringBuilder();
for (int i = 0; i < str.length; i++) {
if (str[i] == '@') {
i++;
... | [["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 196, 0, 45], ["+", 0, 7, 8, 196, 0, 57, 75, 196, 0, 46]] | 3 | 787 | 3 |
#include <stdio.h>
#include <string.h>
int i, j, k, l;
char nyuroku[114514], m;
int main(int argc, char **argv) {
while (scanf("%s", &nyuroku[0]) != EOF) {
l = strlen(nyuroku);
for (i = 0; i < l; i++) {
if (nyuroku[i] != '@') {
printf("%c", nyuroku[i]);
} else {
for (m = '0'; m <... | #include <stdio.h>
#include <string.h>
int i, j, k, l;
char nyuroku[114514], m;
int main(int argc, char **argv) {
while (scanf("%s", &nyuroku[0]) != EOF) {
l = strlen(nyuroku);
for (i = 0; i < l; i++) {
if (nyuroku[i] != '@') {
printf("%c", nyuroku[i]);
} else {
for (m = '0'; m <... | [["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]] | 0 | 148 | 6 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int n, i, o;
char line[101], ans[500], ch[2], ch1[2];
while (scanf("%s", line) != EOF) {
i = 0;
o = 0;
while (line[i]) {
if (line[i] == '@') {
ch[0] = line[i + 1];
ch[1] = 0;
memset(ans + o, line... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int n, i, o;
char line[101], ans[500], ch[2], ch1[2];
while (scanf("%s", line) != EOF) {
i = 0;
o = 0;
while (line[i]) {
if (line[i] == '@') {
ch[0] = line[i + 1];
ch[1] = 0;
memset(ans + o, line... | [["-", 0, 1, 0, 11, 31, 69, 71, 16, 17, 72], ["-", 0, 1, 0, 11, 31, 69, 71, 16, 12, 13]] | 0 | 176 | 2 |
main(i, j) {
char s[256];
for (; ~scanf("%s", s);) {
for (i = 0; s[i]; i++) {
if (s[i] == '@') {
for (j = 0; j < s[i + 1] - '0'; j++)
putchar(s[i + 2]);
i++;
} else
putchar(s[i]);
}
puts("");
}
exit(0);
} | main(i, j) {
char s[256];
for (; ~scanf("%s", s);) {
for (i = 0; s[i]; i++) {
if (s[i] == '@') {
for (j = 0; j < s[i + 1] - '0'; j++)
putchar(s[i + 2]);
i += 2;
} else
putchar(s[i]);
}
puts("");
}
exit(0);
} | [["-", 0, 57, 64, 9, 0, 1, 0, 27, 17, 29], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]] | 0 | 114 | 3 |
#include <stdio.h>
int main(void) {
int i, j, n;
char code[101], buf;
while (scanf("%s", &code) != EOF) {
i = 0;
while (code[i] != '\0') {
if (code[i] != '@') {
printf("%c", code[i]);
i++;
continue;
} else {
n = code[i + 1] - '0';
for (j = 1; j <= n; j+... | #include <stdio.h>
int main(void) {
int i, j, n;
char code[101], buf;
while (scanf("%s", &code) != EOF) {
i = 0;
while (code[i] != '\0') {
if (code[i] != '@') {
printf("%c", code[i]);
i++;
continue;
} else {
n = code[i + 1] - '0';
for (j = 1; j <= n; j+... | [["+", 0, 52, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 0 | 139 | 7 |
#include <iostream>
using namespace std;
string s;
main() {
while (cin >> s) {
for (int i = 0; i < s.size(); i++) {
if (s[i] == '@') {
char c = s[i + 1];
int n = s[i + 2] - '0';
i += 2;
for (int j = 0; j < n; j++)
cout << c;
} else
cout << s[i];
}
... | #include <iostream>
using namespace std;
string s;
main() {
while (cin >> s) {
for (int i = 0; i < s.size(); i++) {
if (s[i] == '@') {
char c = s[i + 2];
int n = s[i + 1] - '0';
i += 2;
for (int j = 0; j < n; j++)
cout << c;
} else
cout << s[i];
}
... | [["-", 49, 50, 51, 69, 341, 342, 0, 16, 12, 13], ["+", 49, 50, 51, 69, 341, 342, 0, 16, 12, 13], ["-", 51, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 113 | 4 |
#include <iostream>
using namespace std;
#include <string>
int main() {
string s;
while (cin >> s) {
for (int i = 0; i < s.size(); i++) {
if (s[i] == '@') {
for (int j = s[i + 1]; j > 0; j--) {
cout << s[j + 1];
}
i += 2;
} else {
cout << s[i];
}
... | #include <iostream>
using namespace std;
#include <string>
int main() {
string s;
while (cin >> s) {
for (int i = 0; i < s.size(); i++) {
if (s[i] == '@') {
for (int j = s[i + 1]; j > '0'; j--) {
cout << s[i + 2];
}
i += 2;
} else {
cout << s[i];
}
... | [["+", 64, 9, 0, 7, 15, 16, 12, 103, 0, 104], ["-", 0, 16, 12, 69, 341, 342, 0, 16, 31, 22], ["+", 0, 16, 12, 69, 341, 342, 0, 16, 31, 22], ["-", 0, 16, 12, 69, 341, 342, 0, 16, 12, 13], ["+", 0, 16, 12, 69, 341, 342, 0, 16, 12, 13]] | 1 | 109 | 6 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
while (cin >> s) {
while (s.find("@") != -1) {
int x = s.find("@");
string buf;
for (int i = 0; i < s[x + 1]; i++)
buf += s[x + 2];
s.replace(x, 3, buf);
}
cout << s << endl;
}
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
while (cin >> s) {
while (s.find("@") != -1) {
int x = s.find("@");
string buf;
for (int i = 0; i < s[x + 1] - '0'; i++)
buf += s[x + 2];
s.replace(x, 3, buf);
}
cout << s << endl;
}
}
| [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 0, 7, 15, 16, 12, 16, 12, 103, 0, 104], ["+", 0, 7, 15, 16, 12, 16, 12, 103, 0, 125]] | 1 | 100 | 4 |
#include <stdio.h>
#include <string.h>
int main(void) {
int len;
int i, j, k;
char str[128];
while (fgets(str, 128, stdin) != NULL) {
len = strlen(str);
for (i = 0; i < len; i++) {
if (str[i] == '@') {
i++;
for (k = 0; k <= str[i] - '0'; k++) {
printf("%c", str[i + 1]);... | #include <stdio.h>
#include <string.h>
int main(void) {
int len;
int i, j, k;
char str[128];
while (fgets(str, 128, stdin) != NULL) {
len = strlen(str);
for (i = 0; i < len; i++) {
if (str[i] == '@') {
i++;
for (k = 0; k < str[i] - '0'; k++) {
printf("%c", str[i + 1]);
... | [["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18]] | 1 | 140 | 2 |
#include <algorithm>
#include <cctype>
#include <climits>
#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 <... | #include <algorithm>
#include <cctype>
#include <climits>
#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 <... | [["+", 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 | 145 | 6 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
while (cin >> s) {
for (int i = 0; i < s.size(); i++) {
if (s[i] == '@') {
for (int j = 0; j < s[i + 1] - '0'; j++) {
cout << s[i + 2];
}
i += 2;
} else {
cout << s[i];
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
while (cin >> s) {
for (int i = 0; i < s.size(); i++) {
if (s[i] == '@') {
for (int j = 0; j < s[i + 1] - '0'; j++) {
cout << s[i + 2];
}
i += 2;
} else {
cout << s[i];
... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 109 | 4 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
while (cin >> s) {
for (int i = 0; i < s.size(); i++) {
if (s[i] == '@') {
for (int j = 0; j < s[i + 1] - '0'; j++) {
cout << s[i + 2];
}
i += 2;
} else
cout << s[i];
}
}... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
while (cin >> s) {
for (int i = 0; i < s.size(); i++) {
if (s[i] == '@') {
for (int j = 0; j < s[i + 1] - '0'; j++) {
cout << s[i + 2];
}
i += 2;
} else
cout << s[i];
}
... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 107 | 4 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define vi vector<int>
#define vvi vector<vector<int>>
#define ll long long int
#define vl vector<ll>
#define vvl vector<... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define vi vector<int>
#define vvi vector<vector<int>>
#define ll long long int
#define vl vector<ll>
#define vvl vector<... | [["-", 3, 4, 0, 69, 341, 342, 0, 16, 12, 13], ["+", 3, 4, 0, 69, 341, 342, 0, 16, 12, 13], ["-", 0, 57, 64, 9, 0, 1, 0, 27, 17, 29], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]] | 1 | 187 | 5 |
#include "bits/stdc++.h"
using namespace std;
string s;
int main(void) {
while (cin >> s) {
for (int i = 0; i < s.length(); ++i) {
if (s[i] == '@') {
for (int j = 0; j < s[i + 1] - '0'; ++j) {
cout << s[i + 2];
}
i = i + 2;
} else {
cout << s[i];
}
... | #include "bits/stdc++.h"
using namespace std;
string s;
int main(void) {
while (cin >> s) {
for (int i = 0; i < s.length(); ++i) {
if (s[i] == '@') {
for (int j = 0; j < s[i + 1] - '0'; ++j) {
cout << s[i + 2];
}
i = i + 2;
} else {
cout << s[i];
}
... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 109 | 4 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
while (cin >> s) {
for (int i = 0; i < s.size(); ++i) {
if (s[i] == '@') {
int x = s[i + 1] - '0';
cout << string(x, s[i + 2]);
} else {
cout << s[i];
}
}
cout << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
while (cin >> s) {
for (int i = 0; i < s.size(); ++i) {
if (s[i] == '@') {
int x = s[i + 1] - '0';
cout << string(x, s[i + 2]);
i += 2;
} else {
cout << s[i];
}
}
cout << endl;
}
} | [["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]] | 1 | 98 | 4 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
string str;
while (cin >> str) {
for (int i = 0; i < str.size(); i++) {
if (str[i] != '@') {
cout << str[i];
continue;
}
for (int j = 0; j < str[i + 1] - '0'; j++) {
cout << str[i + 2];
}
... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
string str;
while (cin >> str) {
for (int i = 0; i < str.size(); i++) {
if (str[i] != '@') {
cout << str[i];
continue;
}
for (int j = 0; j < str[i + 1] - '0'; j++) {
cout << str[i + 2];
}
... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 108 | 4 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define LOOP(i, x, n) for (int i = x; i < n; i++)
#define ALL(v) (v).begin(), (v).end()
#define PB push_back
#define MP make_pair
#define FR first
#define SC second
#define int long long
using namespace std;
const int MOD = 1000000007;
const int INF... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define LOOP(i, x, n) for (int i = x; i < n; i++)
#define ALL(v) (v).begin(), (v).end()
#define PB push_back
#define MP make_pair
#define FR first
#define SC second
#define int long long
using namespace std;
const int MOD = 1000000007;
const int INF... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 144 | 4 |
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using name... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using name... | [["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 9, 0, 57, 64, 9, 0, 1, 0, 35]] | 1 | 328 | 4 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
int a;
cin >> s;
for (int i = 0; i < s.size(); i++) {
if (s[i] == '@') {
a = s[i + 1] - '0';
for (int j = 0; j < a; j++) {
cout << s[i + 2];
}
i += 2;
... |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
int a;
while (cin >> s) {
for (int i = 0; i < s.size(); i++) {
if (s[i] == '@') {
a = s[i + 1] - '0';
for (int j = 0; j < a; j++) {
cout << s[i + 2];
... | [["+", 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 | 115 | 6 |
#include <algorithm>
#include <cmath>
#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;
int main() {
string buffer;
while (ci... | #include <algorithm>
#include <cmath>
#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;
int main() {
string buffer;
while (ci... | [["-", 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 | 145 | 3 |
#include <iostream>
#include <string>
using namespace std;
void solve() {
string str;
while (cin >> str) {
for (int i = 0; i < str.size(); ++i) {
if (str[i] == '@') {
for (int j = 0; j < (str[i + 1] - '0'); ++j) {
cout << str[i + 2];
}
i += 2;
} else {
cou... | #include <iostream>
#include <string>
using namespace std;
void solve() {
string str;
while (cin >> str) {
for (int i = 0; i < str.size(); ++i) {
if (str[i] == '@') {
for (int j = 0; j < (str[i + 1] - '0'); ++j) {
cout << str[i + 2];
}
i += 2;
} else {
cou... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 123 | 4 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
string out = "";
int n;
while (cin >> s) {
for (int i = 0; i < s.length(); i++) {
if (s[i] == '@') {
i++;
n = s[i] - '0';
i++;
for... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
string out = "";
int n;
while (cin >> s) {
out = "";
for (int i = 0; i < s.length(); i++) {
if (s[i] == '@') {
i++;
n = s[i] - '0';
i+... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 5, 0, 62], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 132 | 5 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
while (getline(cin, s), !cin.eof())
while (1) {
size_t p = s.find("@");
if (p == string::npos)
break;
s.replace(p, 3, string(int(s[p + 1] - '0'), s[p + 2]));
}
cout << s << "\n";
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
while (getline(cin, s), !cin.eof()) {
while (1) {
size_t p = s.find("@");
if (p == string::npos)
break;
s.replace(p, 3, string(int(s[p + 1] - '0'), s[p + 2]));
}
cout << s << "\n";
}
} | [["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 102 | 2 |
//============================================================================
// Name : 0077.cpp
// Author : afterCmidday
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#... | //============================================================================
// Name : 0077.cpp
// Author : afterCmidday
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#... | [["+", 0, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["+", 0, 16, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 151 | 2 |
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char input[101];
while (scanf(" %s", input) != EOF) {
for (int i = 0; i < strlen(input); i++) {
if (input[i] == '@') {
for (int j = 0; j < input[i + 1] - '0'; j++) {
cout << input[i + 2] << endl;... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char input[101];
while (scanf(" %s", input) != EOF) {
for (int i = 0; i < strlen(input); i++) {
if (input[i] == '@') {
for (int j = 0; j < input[i + 1] - '0'; j++) {
cout << input[i + 2];
... | [["-", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 123 | 2 |
try:
s, w, h = map(float, input().split(','))
if w / h**2 >= 25:
print(int(s))
except:
pass | try:
while True:
s, w, h = map(float, input().split(','))
if w / h**2 >= 25:
print(int(s))
except:
pass | [["+", 0, 656, 0, 246, 8, 196, 0, 52, 0, 89], ["+", 0, 656, 0, 246, 8, 196, 0, 52, 15, 146], ["+", 0, 656, 0, 246, 8, 196, 0, 52, 0, 102]] | 5 | 42 | 3 |
while True:
try:
n, w, h = list(map(float, input().split()))
if w/h**2 >= 25.0:
print(int(n))
except:
break | while True:
try:
n, w, h = list(map(float, input().split(",")))
if w/h**2 >= 25.0:
print(int(n))
except:
break | [["+", 3, 4, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 3, 4, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 3, 4, 0, 652, 3, 4, 0, 557, 0, 655]] | 5 | 45 | 3 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
String line = scanner.nextLine();
StringBuilder builder = new StringBuilder(line);
while (true) {
int num = builder.indexO... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
String line = scanner.nextLine();
StringBuilder builder = new StringBuilder(line);
while (true) {
int num = builder.indexO... | [["-", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499]] | 3 | 200 | 2 |
import java.io.PrintWriter;
import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
while (sc.hasNext()) {
String str = sc.nextLine();
for (int i = 0; i < str.length(); i++) {
// ... | import java.io.PrintWriter;
import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
while (sc.hasNext()) {
String str = sc.nextLine();
for (int i = 0; i < str.length(); i++) {
// ... | [["+", 0, 52, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 25], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35], ["+", 0, 52, 8, 196, 0, 1, 0, 492, 500, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 492, 0, 131]] | 3 | 197 | 6 |
class Main {
public static void main(String[] z) throws Exception {
for (int n, b; 0 < (b = System.in.read());) {
n = 1;
if (b == 64) {
n = System.in.read() - 49;
b = System.in.read();
}
for (; n-- > 0;)
System.out.print((char)b);
}
}
} | class Main {
public static void main(String[] z) throws Exception {
for (int n, b; 0 < (b = System.in.read());) {
n = 1;
if (b == 64) {
n = System.in.read() - 48;
b = System.in.read();
}
for (; n-- > 0;)
System.out.print((char)b);
}
}
} | [["-", 64, 196, 0, 1, 0, 11, 12, 16, 12, 499], ["+", 64, 196, 0, 1, 0, 11, 12, 16, 12, 499]] | 3 | 97 | 2 |
import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
static char[] input;
public static void main(String[] args) {
while (read()) {
solve();
}
}
static boolean read() {
if (!sc.hasNext())
return false;
input = sc.next().toCharArray();
return true... | import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
static char[] input;
public static void main(String[] args) {
while (read()) {
solve();
}
}
static boolean read() {
if (!sc.hasNext())
return false;
input = sc.next().toCharArray();
return true... | [["+", 0, 52, 8, 196, 0, 57, 75, 196, 0, 46], ["-", 0, 52, 8, 196, 0, 57, 75, 196, 0, 46]] | 3 | 194 | 2 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, k, n) for (int i = (k); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) begin(a), end(a)
#define MS(m, v) memset(m, v, sizeof(m))
#define D10 fixed << setprecision(5)
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> P;
typ... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, k, n) for (int i = (k); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) begin(a), end(a)
#define MS(m, v) memset(m, v, sizeof(m))
#define D10 fixed << setprecision(5)
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> P;
typ... | [["-", 0, 43, 49, 80, 49, 80, 49, 80, 81, 13], ["+", 0, 43, 49, 80, 49, 80, 49, 80, 81, 13], ["-", 0, 30, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 0, 30, 0, 43, 49, 80, 49, 80, 81, 13], ["-", 0, 30, 0, 43, 49, 80, 81, 16, 12, 13], ["+", 0, 30, 0, 43, 49, 80, 81, 16, 12, 13]] | 1 | 359 | 6 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int res[10][1000];
int main() {
vector<int> v;
for (int i = 0; i < 10; i++) {
v.push_back(i);
}
sort(v.begin(), v.end());
do {
int tmp = 0;
for (int j = 0; j < 10; j++) {
tmp += v[j] * (1 + j);
res[j][tm... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int res[10][1000];
int main() {
vector<int> v;
for (int i = 0; i < 10; i++) {
v.push_back(i);
}
sort(v.begin(), v.end());
int mx = 0;
do {
int tmp = 0;
for (int j = 0; j < 10; j++) {
tmp += v[j] * (1 + j);
... | [["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 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], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 52, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 239 | 6 |
#include <cmath>
#include <cstring>
#include <iostream>
using namespace std;
int x[10][600][1024], y[10][600], n, s;
int main() {
x[0][0][0] = 1;
for (int i = 1; i < 10; i++) {
for (int j = 0; j < 500; j++) {
for (int k = 0; k < 1024; k++) {
for (int l = 0; l < 10; l++) {
if ((k / (1 << ... | #include <cmath>
#include <cstring>
#include <iostream>
using namespace std;
int x[11][600][1024], y[11][600], n, s;
int main() {
x[0][0][0] = 1;
for (int i = 1; i <= 10; i++) {
for (int j = 0; j < 500; j++) {
for (int k = 0; k < 1024; k++) {
for (int l = 0; l < 10; l++) {
if ((k / (1 <<... | [["-", 0, 43, 49, 80, 49, 80, 49, 80, 81, 13], ["+", 0, 43, 49, 80, 49, 80, 49, 80, 81, 13], ["-", 0, 30, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 0, 30, 0, 43, 49, 80, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9... | 1 | 258 | 10 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define FOR(i, c) ... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define FOR(i, c) ... | [["+", 0, 52, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 385 | 1 |
#include <iostream>
using namespace std;
int n, s;
int dp[350][1024];
int rec(int k, int sum, int u) {
int res = 0;
if (k == 0 && sum == 0)
return 1;
if (dp[sum][u] >= 0)
return dp[sum][u];
if (k == 0)
return 0;
for (int i = 0; i < 10; i++) {
if (u >> i & 1) {
if (sum - k * i >= 0)
... | #include <iostream>
using namespace std;
int n, s;
int dp[350][1024];
int rec(int k, int sum, int u) {
int res = 0;
if (k == 0 && sum == 0)
return 1;
if (dp[sum][u] >= 0)
return dp[sum][u];
if (k == 0)
return 0;
for (int i = 0; i < 10; i++) {
if (u >> i & 1) {
if (sum - k * i >= 0)
... | [["-", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 12, 13]] | 1 | 307 | 2 |
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using nam... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using name... | [["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 48], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 22]] | 1 | 280 | 2 |
@memo = Array.new(10){Array.new(331){ Array.new(1024) }}
def calc(num,n,s)
return 0 if n<=0 || s<=0 || s>330 || n>10
return @memo[n][s][num] if @memo[n][s][num]
ans = 0
d,m = num.divmod(2)
cnt = 0
while d>0 || cnt<10
if m==0
t = s-cnt*n
if t==0 && n-1==0
ans = 1
break
... | @memo = Array.new(11){Array.new(331){ Array.new(1024) }}
def calc(num,n,s)
return 0 if n<=0 || s<0 || s>330 || n>10
return @memo[n][s][num] if @memo[n][s][num]
ans = 0
d,m = num.divmod(2)
cnt = 0
while d>0 || cnt<10
if m==0
t = s-cnt*n
if t==0 && n==1
ans = 1
break
end... | [["-", 0, 493, 0, 662, 12, 652, 3, 4, 0, 612], ["+", 0, 493, 0, 662, 12, 652, 3, 4, 0, 612], ["-", 15, 738, 31, 738, 31, 738, 12, 738, 17, 19], ["+", 15, 738, 31, 738, 31, 738, 12, 738, 17, 18], ["-", 0, 121, 15, 738, 12, 738, 31, 738, 17, 33], ["-", 0, 121, 15, 738, 12, 738, 31, 738, 12, 612], ["-", 64, 749, 0, 121, 1... | 4 | 196 | 8 |
from collections import defaultdict, Counter
import sys
# dp[n][使った数字(bit)][合計] = count
dp = [defaultdict(Counter) for _ in [0]*11]
dp[0][0][0] = 0
for i in range(1, 11):
for used, counter in dp[i-1].items():
for j in filter(lambda x: used & 2**x == 0, range(10)):
for total, count in counter.i... | from collections import defaultdict, Counter
import sys
# dp[n][使った数字(bit)][合計] = count
dp = [defaultdict(Counter) for _ in [0]*11]
dp[0][0][0] = 1
for i in range(1, 11):
for used, counter in dp[i-1].items():
for j in filter(lambda x: used & 2**x == 0, range(10)):
for total, count in counter.i... | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["-", 0, 7, 8, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 12, 22]] | 5 | 176 | 4 |
function bomb(y, x) {
var dx = [ -1, 1, 0, 0 ];
var dy = [ 0, 0, -1, 1 ];
for (var i = 0; i < 4; i++) {
for (var j = 1; j <= 3; j++) {
var yy = y + (dy[i] * j);
var xx = x + (dx[i] * j);
if (yy < 0 || yy >= 8 || xx < 0 || xx >= 8)
continue;
if (yx[yy][xx] == 1) {
yx[yy]... | function bomb(y, x) {
var dx = [ -1, 1, 0, 0 ];
var dy = [ 0, 0, -1, 1 ];
for (var i = 0; i < 4; i++) {
for (var j = 1; j <= 3; j++) {
var yy = y + (dy[i] * j);
var xx = x + (dx[i] * j);
if (yy < 0 || yy >= 8 || xx < 0 || xx >= 8)
continue;
if (yx[yy][xx] == 1) {
yx[yy]... | [["-", 0, 1, 0, 11, 31, 69, 500, 69, 71, 22], ["+", 0, 1, 0, 11, 31, 69, 500, 69, 71, 22], ["-", 64, 556, 0, 1, 0, 11, 31, 69, 71, 22], ["+", 64, 556, 0, 1, 0, 11, 31, 69, 71, 22]] | 2 | 377 | 4 |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
static int[][] map = new int[8][8];
static void bomb(int x, int y) {
if (map[y][x] == 0)
return;
else { // map[y][x]==1
map[y][x] = 0;
if (y != 0)
bomb(x, y - 1);
... |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
static int[][] map = new int[8][8];
static void bomb(int x, int y) {
if (map[y][x] == 0)
return;
else { // map[y][x]==1
map[y][x] = 0;
if (y != 0)
bomb(x, y - 1);
... | [["-", 0, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 31, 22]] | 3 | 566 | 2 |
import java.awt.Point;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for (int m = 1; m <= n; m++) {
sc.n... | import java.awt.Point;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for (int m = 1; m <= n; m++) {
sc.n... | [["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 72], ["+", 0, 492, 3, 4, 0, 16, 12, 5, 0, 62], ["+", 0, 492, 3, 4, 0, 16, 12, 5, 0, 491]] | 3 | 529 | 4 |
import java.util.Scanner;
public class Main {
static int base[][];
static int h, w;
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int I = 1;
while (N-- > 0) {
String S = in.nextLine();
String SS = in.nextLine();
base = new int... | import java.util.Scanner;
public class Main {
static int base[][];
static int h, w;
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int I = 1;
while (N-- > 0) {
String S = in.nextLine();
String SS = in.nextLine();
base = new int... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499]] | 3 | 427 | 8 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = sc.nextInt();
for (int a = 1; a <= n; a++) {
int[][] map = new int[8][8];
String s = "";
for (int i = 0; i < 8; i++) {
... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = sc.nextInt();
for (int a = 1; a <= n; a++) {
int[][] map = new int[8][8];
String s = "";
for (int i = 0; i < 8; i++) {
... | [["-", 0, 7, 8, 196, 0, 1, 0, 27, 0, 68], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 12, 499]] | 3 | 582 | 3 |
#include <stdio.h>
int main() {
int n, x[65], y[65], c, i, j, t, r;
char m[15][15];
int X[4] = {0, 1, 0, -1};
int Y[4] = {1, 0, -1, 0};
scanf("%d", &n);
for (c = 0; c < n; c++) {
for (i = 0; i < 8; i++)
scanf(" %s", m[i + 3] + 3);
scanf(" %d %d", &x[0], &y[t = 0]);
x[0] += 2;
y[0] += 2... | #include <stdio.h>
int main() {
int n, x[65], y[65], c, i, j, t, r;
char m[15][15];
int X[4] = {0, 1, 0, -1};
int Y[4] = {1, 0, -1, 0};
scanf("%d", &n);
for (c = 0; c < n; c++) {
for (i = 0; i < 8; i++)
scanf(" %s", m[i + 3] + 3);
scanf(" %d %d", &x[0], &y[t = 0]);
x[0] += 2;
y[0] += 2... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 360 | 2 |
#include <stdio.h>
int main() {
int n, i, j, k, t, r, ny, nx, x[100], y[100];
int X[] = {0, 1, 0, -1, 0, 2, 0, -2, 0, 3, 0, -3};
int Y[] = {1, 0, -1, 0, 2, 0, -2, 0, 3, 0, -3, 0};
char xx, yy, m[15][15] = {0};
scanf("%d", &n); // printf("%d\n",n);
for (i = 0; i < n; i++) {
for (j = t = 0; j < 8; j++)
... | #include <stdio.h>
int main() {
int n, i, j, k, t, r, ny, nx, x[100], y[100];
int X[] = {0, 1, 0, -1, 0, 2, 0, -2, 0, 3, 0, -3};
int Y[] = {1, 0, -1, 0, 2, 0, -2, 0, 3, 0, -3, 0};
char xx, yy, m[15][15] = {0};
scanf("%d", &n); // printf("%d\n",n);
for (i = 0; i < n; i++) {
for (j = t = 0; j < 8; j++)
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 373 | 2 |
// mitocode
#include <stdio.h>
void bomb(int x, int y);
char field[10][10];
int main(void) {
int n, m;
int i, j;
int x, y;
m = 0;
scanf("%d", &n);
while (m < n) {
for (i = 0; i < 8; i++) {
scanf("%s", field[i]);
}
scanf("%d %d", &x, &y);
bomb(x - 1, y - 1);
printf("Date %d:\n... | // mitocode
#include <stdio.h>
void bomb(int x, int y);
char field[10][10];
int main(void) {
int n, m;
int i, j;
int x, y;
m = 0;
scanf("%d", &n);
while (m < n) {
for (i = 0; i < 8; i++) {
scanf("%s", field[i]);
}
scanf("%d %d", &x, &y);
bomb(x - 1, y - 1);
printf("Data %d:\n... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 17, 19], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 12, 13]] | 0 | 340 | 10 |
#include <stdio.h>
int main(void) {
int nu, x, y;
char bomb[14][14] = {0};
int num[14][14];
int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r;
scanf("%d", &nu);
for (a = 0; a < nu; a++) {
for (b = 3; b < 11; b++) {
scanf("%s", bomb[b]);
}
for (c = 0; c < 8; c++) {
for (d = 7; ... | #include <stdio.h>
int main(void) {
int nu, x, y;
char bomb[14][14] = {0};
int num[14][14];
int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r;
scanf("%d", &nu);
for (a = 0; a < nu; a++) {
for (b = 3; b < 11; b++) {
scanf("%s", bomb[b]);
}
for (c = 0; c < 8; c++) {
for (d = 7; ... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 625 | 2 |
#include <stdio.h>
char map[8][8];
void bomb(int x, int y) {
int i;
if (x < 0 || x > 7 || y < 0 || y > 7)
return;
if (map[y][x] == '1') {
map[y][x] = '0';
for (i = 1; i <= 3; i++) {
bomb(x + i, y);
bomb(x - i, y);
bomb(x, y + i);
bomb(x, y - i);
}
}
return;
}
void... | #include <stdio.h>
char map[8][8];
void bomb(int x, int y) {
int i;
if (x < 0 || x > 7 || y < 0 || y > 7)
return;
if (map[y][x] == '1') {
map[y][x] = '0';
for (i = 1; i <= 3; i++) {
bomb(x + i, y);
bomb(x - i, y);
bomb(x, y + i);
bomb(x, y - i);
}
}
return;
}
void... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 330 | 2 |
#include <stdio.h>
void bomb(int x, int y, int map[8][8]) {
int i;
map[y][x] = 0;
for (i = ((x - 3 < 0) ? 0 : (x - 3)); i <= ((x + 3 > 7) ? 7 : (x + 3)); i++) {
if (map[y][i] == 1) {
bomb(i, y, map);
break;
}
map[y][i] = 0;
}
for (i = ((y - 3 < 0) ? 0 : (y - 3)); i <= ((y + 3 > 7) ... | #include <stdio.h>
void bomb(int x, int y, int map[8][8]) {
int i;
map[y][x] = 0;
for (i = ((x - 3 < 0) ? 0 : (x - 3)); i <= ((x + 3 > 7) ? 7 : (x + 3)); i++) {
if (map[y][i] == 1) {
bomb(i, y, map);
}
map[y][i] = 0;
}
for (i = ((y - 3 < 0) ? 0 : (y - 3)); i <= ((y + 3 > 7) ? 7 : (y + 3)... | [["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35], ["-", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]] | 0 | 425 | 4 |
#include <math.h>
#include <stdio.h>
int bomb[8][8];
void fire(int i, int j) {
int k;
bomb[i][j] = 0;
for (k = (i < 3 ? 0 : i - 3); k < (i > 4 ? 8 : i + 4); k++)
if (bomb[k][j])
fire(k, j);
for (k = (j < 3 ? 0 : j - 3); k < (j > 4 ? 8 : j + 4); k++)
if (bomb[i][k])
fire(i, k);
}
int main(voi... | #include <math.h>
#include <stdio.h>
int bomb[8][8];
void fire(int i, int j) {
int k;
bomb[i][j] = 0;
for (k = (i < 3 ? 0 : i - 3); k < (i > 4 ? 8 : i + 4); k++)
if (bomb[k][j])
fire(k, j);
for (k = (j < 3 ? 0 : j - 3); k < (j > 4 ? 8 : j + 4); k++)
if (bomb[i][k])
fire(i, k);
}
int main(voi... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 313 | 2 |
#include <cstdio>
using namespace std;
char field[8][12];
void bomb(int x, int y) {
field[x][y] = '0';
for (int i = -3; i <= 3; i++) {
if (x + i >= 0 && x + i < 8 && field[x + i][y] == '1') {
bomb(x + i, y);
}
if (y + i >= 0 && y + i < 8 && field[x][y + i] == '1') {
bomb(x, y + i);
}
... | #include <cstdio>
using namespace std;
char field[8][12];
void bomb(int x, int y) {
field[x][y] = '0';
for (int i = -3; i <= 3; i++) {
if (x + i >= 0 && x + i < 8 && field[x + i][y] == '1') {
bomb(x + i, y);
}
if (y + i >= 0 && y + i < 8 && field[x][y + i] == '1') {
bomb(x, y + i);
}
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 267 | 2 |
#include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef pair<int, int> P;
typedef queue<P> Q;
const int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
int main() {
int n;
cin >> n;
int count = 0;
while (n > count) {
vector<string> v(8, "00000000");
for (a... | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef pair<int, int> P;
typedef queue<P> Q;
const int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
int main() {
int n;
cin >> n;
int count = 0;
while (n > count) {
vector<string> v(8, "00000000");
for (a... | [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 332 | 2 |
#include <cstdio>
char bom[10][10];
int dy[] = {-1, -2, -3, 0, 0, 0, 1, 2, 3, 0, 0, 0},
dx[] = {0, 0, 0, 1, 2, 3, 0, 0, 0, -1, -2, -3};
void dfs(int y, int x) {
if (y < 0 || x < 0 || y > 8 || x > 8)
return;
if (bom[y][x] == 0)
return;
if (bom[y][x] == '1') {
bom[y][x] = '0';
for (int i = 0; i ... | #include <cstdio>
char bom[10][10];
int dy[] = {-1, -2, -3, 0, 0, 0, 1, 2, 3, 0, 0, 0},
dx[] = {0, 0, 0, 1, 2, 3, 0, 0, 0, -1, -2, -3};
void dfs(int y, int x) {
if (y < 0 || x < 0 || y > 8 || x > 8)
return;
if (bom[y][x] == 0)
return;
if (bom[y][x] == '1') {
bom[y][x] = '0';
for (int i = 0; i ... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 310 | 2 |
#include <bits/stdc++.h>
using namespace std;
int n, a, b, c;
char miti[10][10];
void bobm(int x, int y) {
for (int s = 1; s <= 3; s++) {
if (x + s < 9) {
if (miti[x + s][y] == '1') {
miti[x + s][y] = '0';
bobm(x + s, y);
}
}
if (y - s > 0) {
if (miti[x][y - s] == '1') {
... | #include <bits/stdc++.h>
using namespace std;
int n, a, b, c;
char miti[10][10];
void bobm(int x, int y) {
for (int s = 1; s <= 3; s++) {
if (x + s < 9) {
if (miti[x + s][y] == '1') {
miti[x + s][y] = '0';
bobm(x + s, y);
}
}
if (y - s > 0) {
if (miti[x][y - s] == '1') {
... | [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 411 | 2 |
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <valarray>
#include <vector>
using namespace ... | #include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <valarray>
#include <vector>
using namespace ... | [["+", 0, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 16, 12, 16, 12, 13]] | 1 | 536 | 2 |
import java.io.*;
public class Main {
public static void main(String... args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = "";
double x[] = new double[20];
double y[] = new double[20];
int i = 0;
while ((line = br.readLine()) != nul... | import java.io.*;
public class Main {
public static void main(String... args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = "";
double x[] = new double[20];
double y[] = new double[20];
int i = 0;
while ((line = br.readLine()) != nul... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]] | 3 | 209 | 2 |
import java.util.Scanner;
// Area of Polygon
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double[][] p = new double[20][2];
int n = 0;
while (sc.hasNext()) {
String s[] = sc.next().split(",");
p[n][0] = Double.parseDouble(s[0]);
... | import java.util.Scanner;
// Area of Polygon
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double[][] p = new double[20][2];
int n = 0;
while (sc.hasNext()) {
String s[] = sc.next().split(",");
p[n][0] = Double.parseDouble(s[0]);
... | [["-", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 229 | 2 |
import static java.lang.Math.*;
import static java.util.Arrays.*;
import java.util.*;
public class Main {
int INF = 1 << 28;
void run() {
Scanner sc = new Scanner(System.in);
double s = 0;
double[] x = new double[3];
double[] y = new double[3];
String[] str = sc.next().split(",");
x[0] =... |
import static java.lang.Math.*;
import static java.util.Arrays.*;
import java.util.*;
public class Main {
int INF = 1 << 28;
void run() {
Scanner sc = new Scanner(System.in);
double s = 0;
double[] x = new double[3];
double[] y = new double[3];
String[] str = sc.next().split(",");
x[0] =... | [["-", 8, 196, 0, 1, 0, 11, 12, 504, 71, 499], ["+", 8, 196, 0, 1, 0, 11, 12, 504, 71, 499], ["+", 0, 503, 49, 200, 51, 16, 31, 23, 0, 24], ["+", 0, 503, 49, 200, 51, 16, 31, 23, 0, 25], ["+", 8, 196, 0, 503, 49, 200, 51, 16, 17, 85], ["+", 8, 196, 0, 503, 49, 200, 51, 16, 12, 499]] | 3 | 491 | 6 |
#include <math.h>
#include <stdio.h>
int main(void) {
double a[20], b[20], A, B, C, Z, S;
int i = 0, j;
while (scanf("%lf,%lf", &a[i], &b[i]) != EOF)
i++;
for (j = 1; j <= i - 1; j++) {
A = sqrt((a[0] - a[j]) * (a[0] - a[j]) + (b[0] - b[j]) * (b[0] - b[j]));
B = sqrt((a[j] - a[j + 1]) * (a[j] - a... | #include <math.h>
#include <stdio.h>
int main(void) {
double a[20], b[20], A, B, C, Z, S;
int i = 0, j;
while (scanf("%lf,%lf", &a[i], &b[i]) != EOF)
i++;
for (j = 1; j < i - 1; j++) {
A = sqrt((a[0] - a[j]) * (a[0] - a[j]) + (b[0] - b[j]) * (b[0] - b[j]));
B = sqrt((a[j] - a[j + 1]) * (a[j] - a[... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]] | 0 | 307 | 2 |
#include <math.h>
#include <stdio.h>
int main(void) {
double x[21], y[21], s = 0.0;
int n = 1, i;
y[0] = 0;
while (scanf("%lf,%lf", &x[n], &y[n]) != EOF) {
n++;
}
x[0] = x[n];
x[n + 1] = x[1];
for (i = 1; i < n; i++) {
s += (x[i - 1] - x[i + 1]) * y[i];
}
s *= -0.5;
printf("%f\n", fabs... | #include <math.h>
#include <stdio.h>
int main(void) {
double x[21], y[21], s = 0.0;
int n = 0, i;
y[0] = 0;
while (scanf("%lf,%lf", &x[n + 1], &y[n + 1]) != EOF) {
n++;
}
x[0] = x[n];
x[n + 1] = x[1];
for (i = 1; i <= n; i++) {
s += (x[i - 1] - x[i + 1]) * y[i];
}
s *= -0.5;
printf("%... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 3, 4, 0, 66, 28, 69, 71, 16, 17, 72], ["+", 3, 4, 0, 66, 28, 69, 71, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 0 | 148 | 8 |
#include <math.h>
#include <stdio.h>
double area(double a, double b, double c);
int main() {
int i, n = 0;
double x[20];
double y[20];
double a, b, c, s = 0;
while (scanf("%f,%f", &x[n], &y[n]) != EOF) {
n++;
}
for (i = 1; i < n - 1; i++) {
a = sqrt((x[0] - x[i]) * (x[0] - x[i]) + (y[0] - y[i])... | #include <math.h>
#include <stdio.h>
double area(double a, double b, double c);
int main() {
int i, n = 0;
double x[20];
double y[20];
double a, b, c, s = 0;
while (scanf("%lf,%lf", &x[n], &y[n]) != EOF) {
n++;
}
for (i = 1; i < n - 1; i++) {
a = sqrt((x[0] - x[i]) * (x[0] - x[i]) + (y[0] - y[i... | [["-", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]] | 0 | 345 | 5 |
#include <math.h>
#include <stdio.h>
int main() {
int i = 0, j;
double x[21], y[21], s = 0;
//値の読み込み
while (scanf("%lf,%lf\n", &x[i], &y[i]) != EOF) {
// scanf("%lf%lf",&x[i],&y[i]);
i++;
}
j = i;
for (i = 1; i < j - 1; i++) {
s += (x[i] * y[i + 1] - x[i + 1] * y[i]);
}
s += (x[i] * y[0] ... | #include <math.h>
#include <stdio.h>
int main() {
int i = 0, j;
double x[21], y[21], s = 0;
//値の読み込み
while (scanf("%lf,%lf\n", &x[i], &y[i]) != EOF) {
// scanf("%lf%lf",&x[i],&y[i]);
i++;
}
j = i;
for (i = 0; i < j - 1; i++) {
s += (x[i] * y[i + 1] - x[i + 1] * y[i]);
}
s += (x[i] * y[0] ... | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]] | 0 | 156 | 2 |
#define cross(a1, b1, a2, b2) ((a1) * (b2) - (a2) * (b1))
int main() {
double a[20], b[20], s, t, x;
int n = 0, c = 1, i;
for (; ~scanf("%lf,%lf", a + n, b + n); n++)
;
for (n = i, i = s = t = 0; i < n - 1; i++) {
if ((x = cross(a[i], b[i], a[i + 1], b[i + 1])) > 0)
s += fabs(x) / 2.0;
else
... | #define cross(a1, b1, a2, b2) ((a1) * (b2) - (a2) * (b1))
int main() {
double a[20], b[20], s, t, x;
int n = 0, c = 1, i;
for (; ~scanf("%lf,%lf", a + n, b + n); n++)
;
for (i = s = t = 0; i < n - 1; i++) {
if ((x = cross(a[i], b[i], a[i + 1], b[i + 1])) > 0)
s += fabs(x) / 2.0;
else
t +... | [["-", 8, 9, 0, 7, 10, 34, 31, 11, 31, 22], ["-", 8, 9, 0, 7, 10, 34, 31, 11, 17, 32], ["-", 8, 9, 0, 7, 10, 34, 31, 11, 12, 22], ["-", 0, 14, 8, 9, 0, 7, 10, 34, 0, 21]] | 0 | 218 | 4 |
#include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include... | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 606 | 2 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define reps(i, f, n) for (int i = f; i < int(n); i++)
#define rep(i, n) reps(i, 0, n)
#define X real... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define reps(i, f, n) for (int i = f; i < int(n); i++)
#define rep(i, n) reps(i, 0, n)
#define X real... | [["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22]] | 1 | 195 | 2 |
#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
const double INF = 1e12;
typedef complex<double> P;
namespace std {
bool operator<(const P &a, const P &b) {
return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
}
} // namespace std
double cross(const P &a, const P &b) { return im... | #include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
const double INF = 1e12;
typedef complex<double> P;
namespace std {
bool operator<(const P &a, const P &b) {
return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
}
} // namespace std
double cross(const P &a, const P &b) { return im... | [["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 260 | 3 |
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
double goa(double xh, double yh, double xc, double yc) {
double X = xc - xh;
double Y = yc - yh;
double a;
a = sqrt((xc - xh) * (xc - xh) + (yc - yh) * (yc - yh));
return a;
}
double mense(double a, double b, double c) {
double z;... | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
double goa(double xh, double yh, double xc, double yc) {
double X = xc - xh;
double Y = yc - yh;
double a;
a = sqrt((xc - xh) * (xc - xh) + (yc - yh) * (yc - yh));
return a;
}
double mense(double a, double b, double c) {
double z;... | [["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22]] | 1 | 371 | 4 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
typedef complex<double> xy_t;
xy_t P[110];
int main() {
int N = 0;
double x, y;
while (~scanf("%lf,%lf", &x, &y)) {
P[N++] = xy_t(x, y);
double sum = 0.0;
for (int ... | #include <algorithm>
#include <cmath>
#include <complex>
#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
typedef complex<double> xy_t;
xy_t P[110];
int main() {
int N = 0;
double x, y;
while (~scanf("%lf,%lf", &x, &y)) {
P[N++] = xy_t(x, y);
}
double sum = 0.0;
for (int... | [["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]] | 1 | 169 | 2 |
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
double sum = 0;
double x[21], y[21];
double hen[30];
double shen;
int count = 0;
double z;
while (scanf("%lf,%lf", &x[count], &y[count]) != EOF) {
if (count > 0) {
hen[count - 1] = sqrt(... | #include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
double sum = 0;
double x[21], y[21];
double hen[30];
double shen;
int count = 0;
double z;
while (scanf("%lf,%lf", &x[count], &y[count]) != EOF) {
if (count > 0) {
hen[count - 1] = sqrt(... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 284 | 2 |
#include <cmath>
#include <iostream>
using namespace std;
double Length(double x1, double y1, double x2, double y2) {
return sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
}
double Triangle_Area(double a, double b, double c) {
double z = (a + b + c) / 2.0;
return sqrt(z * (z - a) * (z - b) * (z - c));
}
int main()... | #include <cmath>
#include <iostream>
using namespace std;
double Length(double x1, double y1, double x2, double y2) {
return sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
}
double Triangle_Area(double a, double b, double c) {
double z = (a + b + c) / 2.0;
return sqrt(z * (z - a) * (z - b) * (z - c));
}
int main()... | [["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 17, 152], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 12, 22]] | 1 | 272 | 5 |
#include <bits/stdc++.h>
#define rep(i, l, n) for (int i = l; i < n; i++)
#define rer(i, l, n) for (int i = l; i <= n; i++)
#define all(a) a.begin(), a.end()
#define o(a) cout << a << endl
#define pb(a) push_back(a)
#define mk(a, b) make_pair(a, b)
#define fi first
#define se second
using namespace std;
typedef long lo... | #include <bits/stdc++.h>
#define rep(i, l, n) for (int i = l; i < n; i++)
#define rer(i, l, n) for (int i = l; i <= n; i++)
#define all(a) a.begin(), a.end()
#define o(a) cout << a << endl
#define pb(a) push_back(a)
#define mk(a, b) make_pair(a, b)
#define fi first
#define se second
using namespace std;
typedef long lo... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 248 | 2 |
#include <cmath>
#include <complex>
#include <cstdio>
#include <vector>
using namespace std;
typedef complex<double> xy_t;
double cross_product(xy_t a, xy_t b) { return (conj(a) * b).real(); }
int main() {
double x, y;
double s = 0;
vector<xy_t> vertex;
while (scanf("%lf,%lf", &x, &y) != EOF) {
vertex.p... | #include <cmath>
#include <complex>
#include <cstdio>
#include <vector>
using namespace std;
typedef complex<double> xy_t;
double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); }
int main() {
double x, y;
double s = 0;
vector<xy_t> vertex;
while (scanf("%lf,%lf", &x, &y) != EOF) {
vertex.p... | [["-", 8, 9, 0, 37, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 37, 0, 2, 63, 118, 119, 120]] | 1 | 160 | 2 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
double v[128][2];
double x, y;
int n = 0;
while (scanf("%lf,%lf", &x, &y) != EOF) {... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
double v[128][2];
double x, y;
int n = 0;
while (scanf("%lf,%lf", &x, &y) != EOF) {... | [["-", 51, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["+", 51, 16, 31, 2, 3, 4, 0, 16, 17, 33]] | 1 | 218 | 2 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef complex<double> xy_t;
char c;
double x, y;
xy_t P[20];
const int MAX = 1... |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef complex<double> xy_t;
char c;
double x, y;
xy_t P[20];
const int MAX = 1... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 191 | 2 |
#include <cmath>
#include <complex>
#include <iostream>
#include <stdio.h>
using namespace std;
typedef complex<double> xy_t;
double dot_product(xy_t a, xy_t b) { return (conj(a) * b).real(); }
double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); }
int main() {
xy_t o, a, b;
double sum = 0, x, y;
... | #include <cmath>
#include <complex>
#include <iostream>
#include <stdio.h>
using namespace std;
typedef complex<double> xy_t;
double dot_product(xy_t a, xy_t b) { return (conj(a) * b).real(); }
double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); }
int main() {
xy_t o, a, b;
double sum = 0, x, y;
... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]] | 1 | 197 | 4 |
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
using namespace std;
typedef complex<double> xy_t;
int main() {
xy_t P[110];
int N = 0;
double x, y;
while (scanf("%lf,%lf", &x, &y)) {
P[N++] = xy_t(x, y);
}
double sum = 0.0;
for (int i = 0; i + 2 < N; ++i) {
xy_t a = P[0]... | #include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
using namespace std;
typedef complex<double> xy_t;
int main() {
xy_t P[110];
int N = 0;
double x, y;
while (~scanf("%lf,%lf", &x, &y)) {
P[N++] = xy_t(x, y);
}
double sum = 0.0;
for (int i = 0; i + 2 < N; ++i) {
xy_t a = P[0... | [["+", 8, 9, 0, 52, 15, 339, 51, 91, 17, 92]] | 1 | 158 | 1 |
#include <algorithm>
#include <cctype>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int size(string x) {
string::size_type size = x.size();
return size;
}
#define fu(l, k) for (int ... | #include <algorithm>
#include <cctype>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int size(string x) {
string::size_type size = x.size();
return size;
}
#define fu(l, k) for (int ... | [["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38]] | 1 | 421 | 1 |
#include <cmath>
#include <complex>
#include <stdio.h>
using namespace std;
typedef complex<double> xy_t;
xy_t p[110];
double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); }
int main() {
int N = 0;
double x, y;
while (scanf("%lf,%lf", &x, &y) != EOF) {
p[N++] = xy_t(x, y);
}
double sum = 0... | #include <cmath>
#include <complex>
#include <stdio.h>
using namespace std;
typedef complex<double> xy_t;
xy_t p[110];
double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); }
int main() {
int N = 0;
double x, y;
while (scanf("%lf,%lf", &x, &y) != EOF) {
p[N++] = xy_t(x, y);
}
double sum = 0... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 173 | 2 |
// 32
#include <cmath>
#include <complex>
#include <cstdio>
using namespace std;
int main() {
double x, y, px, py;
scanf("%lf,%lf,%lf,%lf", &x, &y, &px, &py);
double s = 0;
complex<double> p(x, y), pp(px, py);
for (double cx, cy; scanf("%lf,%lf", &cx, &cy) != EOF;) {
complex<double> cp(cx, cy);
doub... | // 32
#include <cmath>
#include <complex>
#include <cstdio>
using namespace std;
int main() {
double x, y, px, py;
scanf("%lf,%lf%lf,%lf", &x, &y, &px, &py);
double s = 0;
complex<double> p(x, y), pp(px, py);
for (double cx, cy; scanf("%lf,%lf", &cx, &cy) != EOF;) {
complex<double> cp(cx, cy);
doubl... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 187 | 2 |
#include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
struct rec {
double x, y;
};
int main() {
int n;
struct rec dot[21] = {0};
double ans = 0, a, b, c, z;
for (int i = 0; i < 20; i++) {
if (scanf("%lf,%lf", &dot[i].x, &dot[i].y) == EOF) {
n = i;
break;
}
}
... | #include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
struct rec {
double x, y;
};
int main() {
int n;
struct rec dot[21] = {0};
double ans = 0, a, b, c, z;
for (int i = 0; i < 20; i++) {
if (scanf("%lf,%lf", &dot[i].x, &dot[i].y) == EOF) {
n = i;
break;
}
}
... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 317 | 4 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
double check(double x1, double y1, double x2, double y2, double x3, double y3);
int main(void) {
double ans = 0;
double xa, ya, xb, yb, xc, yc;
scanf("%lf,%lf", &xa, &xb);
scanf("%lf,%lf", &xb, &yb... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
double check(double x1, double y1, double x2, double y2, double x3, double y3);
int main(void) {
double ans = 0;
double xa, ya, xb, yb, xc, yc;
scanf("%lf,%lf", &xa, &ya);
scanf("%lf,%lf", &xb, &yb... | [["-", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22]] | 1 | 344 | 2 |
// start: 23:15
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef pair<int, int> xy;
double triangle(double x1, double y1, double x2, double y2, double x3,
double y3) {
// 正規化(ベクトルに変換)
// 掛け算
// 1... | // start: 23:15
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef pair<double, double> xy;
// 三角形の面積を求める
double triangle(double x1, double y1, double x2, double y2, double x3,
double y3) {
// 正規化(ベクトル... | [["-", 0, 134, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 134, 39, 344, 3, 347, 0, 77, 39, 40], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 31, 13], ["+", 0, 14, 8, 9, 0, 37, 0, 16, 31, 13]] | 1 | 262 | 6 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> x, y;
double a, b, c, s;
while (~scanf("%lf,%lf", &a, &b)) {
x.push_back(a);
y.push_back(b);
}
for (int i = 1; i <= x.size(); i++) {
x[i % x.size()] -= x[0];... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<double> x, y;
double a, b, c, s;
while (~scanf("%lf,%lf", &a, &b)) {
x.push_back(a);
y.push_back(b);
}
for (int i = 1; i <= x.size(); i++) {
x[i % x.size()] -= x[... | [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22]] | 1 | 192 | 4 |
#include <cstdio>
#include <cstdlib>
#include <iostream>
int main() {
double x0, y0, x1, y1, x, y, s = 0;
char c;
std::cin >> x0 >> c >> y0;
x1 = x0;
y1 = y0;
while (std::cin >> x >> c >> y) {
s += x1 * y - y1 * x;
x1 = x;
y1 = y;
}
s += x1 * y0 - y1 * x0;
printf("%.6f\n", abs(s / 2));
} | #include <cmath>
#include <cstdio>
#include <iostream>
int main() {
double x0, y0, x1, y1, x, y, s = 0;
char c;
std::cin >> x0 >> c >> y0;
x1 = x0;
y1 = y0;
while (std::cin >> x >> c >> y) {
s += x1 * y - y1 * x;
x1 = x;
y1 = y;
}
s += x1 * y0 - y1 * x0;
printf("%.6f\n", fabs(s / 2));
} | [["-", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["+", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22]] | 1 | 107 | 6 |
#include <cstdlib>
#include <iostream>
int main() {
double x0, y0, x1, y1, x, y, s = 0;
char c;
std::cin >> x0 >> c >> y0;
x1 = x0;
y1 = y0;
while (std::cin >> x >> c >> y) {
s += x1 * y - y1 * x;
x1 = x;
y1 = y;
}
s += x1 * y0 - y1 * x0;
std::cout << abs(s / 2) << "\n";
} | #include <cmath>
#include <iostream>
int main() {
double x0, y0, x1, y1, x, y, s = 0;
char c;
std::cin >> x0 >> c >> y0;
x1 = x0;
y1 = y0;
while (std::cin >> x >> c >> y) {
s += x1 * y - y1 * x;
x1 = x;
y1 = y;
}
s += x1 * y0 - y1 * x0;
std::cout << fabs(s / 2) << "\n";
} | [["-", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["+", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 0, 1, 0, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 2, 63, 22]] | 1 | 105 | 12 |
def area(p)
x, y = p[0]
s = 0.0
oldV = [p[1][0]-x, p[1][1]-y]
p[2..-1].each do |x1, y1|
va = [x1-x, y1-y]
s += triangleArea(va, oldV)
oldV = va
end
s
end
def triangleArea(a, b)
(a[0] * b[1] - a[1] * b[0])/2.0
end
if __FILE__ == $0
points = []
loop do
input = gets
break if input.n... | def area(p)
x, y = p[0]
s = 0.0
oldV = [p[1][0]-x, p[1][1]-y]
p[2..-1].each do |x1, y1|
va = [x1-x, y1-y]
s += triangleArea(va, oldV)
oldV = va
end
s
end
def triangleArea(a, b)
((a[0] * b[1] - a[1] * b[0])/2.0).abs
end
if __FILE__ == $0
points = []
loop do
input = gets
break if i... | [["+", 0, 652, 486, 739, 0, 738, 31, 739, 0, 24], ["+", 0, 735, 8, 736, 0, 652, 486, 739, 0, 25], ["+", 0, 493, 0, 735, 8, 736, 0, 652, 17, 131], ["+", 0, 493, 0, 735, 8, 736, 0, 652, 735, 22]] | 4 | 151 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.