submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s940978013 | p00088 | C++ | #include <iostream>
#include <string>
std::string encode(char c){
if(c == ' ') return "101";
if(c == '\'') return "000000";
if(c == ',') return "000011";
if(c == '-') return "10010001";
if(c == '.') return "010001";
if(c == '?') return "000001";
if(c == 'A') return "100101";
if(c == 'B... | a.cc: In function 'std::string encode2(std::string)':
a.cc:58:32: error: expected ';' before 'if'
58 | if(s == "10000") return "Q"
| ^
| ;
59 | if(s == "10001") return "R";
| ~~
|
s134308359 | p00088 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<cmath>
using namespace std;
string DoctorTableAD(char c){
string s;
switch( c ){
case ' ': s = "101"; break;
case 0x27: s = "000000"; break;
case ',': s = "000011"; break;
case '-': s = "10010001"; break;
case '.': s = "010001"; break;
cas... | a.cc: In function 'std::string DoctorLovedEncode(std::string&)':
a.cc:72:47: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>'
72 | ret += DoctorTableDA( s.substr(i*5,5) );
| ... |
s236447256 | p00088 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <sstream>
#include <map>
using namespace std;
string mkzero(int len) {
char str[80];
sprintf(str, "%0*d", len, 0);
return string(str);
}
int main() {
const char * fromA = " ',-.?ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const char * toA[] = {
... | a.cc: In function 'int main()':
a.cc:91:26: error: 'strlen' was not declared in this scope
91 | for(int i = 0, len = strlen(fromA); i < len; i++) {
| ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #i... |
s612698260 | p00088 | C++ | include <iostream>
#include <string>
using namespace std;
int main(){
string map[1000];
map['A']="100101"; map['B']="10011010"; map['C']="0101"; map['D']="0001";
map['E']="110"; map['F']="01001"; map['G']="10011011"; map['H']="010000";
map['I']="0111"; map['J']="10011000"; map['K']="0110"; map['L']="00100";
... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a typ... |
s117621216 | p00089 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
static int[][] diamond = null;
static int[][] max = null;
static int[] tmpMax = null;
static int height = -1;
static int width = -1;
public static void main(String[] args)... | Main.java:6: error: illegal character: '\u3000'
public class?Main {
^
1 error
|
s930827282 | p00089 | C | t[55],y[55],n,x,z,i;
main(){
for(;n-2||!z++;){
for(i=1;i<2||getchar()==44;scanf("%d",y+i++));
if(i>n)
for(n=i;--i;t[i]=y[i]+fmax(t[i],t[i-1]);
else
for(n=i,i=0;i++<n;t[i]=y[i]+fmax(t[i],t[i+1]);
}
n=!printf("%d\n",t[1]);
} | main.c:1:1: warning: data definition has no type or storage class
1 | t[55],y[55],n,x,z,i;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
main.c:1:7: error: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
1 | t[55],y[55],n,x,z,i;
| ^
main.c:1... |
s165614181 | p00089 | C | t[55],y[55],n,x,z;main(i){for(;n-2||!z++;){for(i=1;i<2||getchar()==44;scanf("%d",y+i++));if(i>n)for(n=i;--i;t[i]=y[i]+fmax(t[i],t[i-1]));elsefor(n=i,i=0;i++<n;t[i]=y[i]+fmax(t[i],t[i+1]));}n=!printf("%d\n",t[1]);} | main.c:1:1: warning: data definition has no type or storage class
1 | t[55],y[55],n,x,z;main(i){for(;n-2||!z++;){for(i=1;i<2||getchar()==44;scanf("%d",y+i++));if(i>n)for(n=i;--i;t[i]=y[i]+fmax(t[i],t[i-1]));elsefor(n=i,i=0;i++<n;t[i]=y[i]+fmax(t[i],t[i+1]));}n=!printf("%d\n",t[1]);}
| ^
main.c:1:1: error: typ... |
s124132497 | p00089 | C++ | #include <bits/stdc++.h>
using namespace std;
vector<vector<int>> v;
int ret = 0;
void f(int n, int x, int y){
if(x == v.size()-1) ret = max(ret, n+v[x][y]);
else {
for(int i=0; i <= 1; i++){
if(0 <= y+i && y+i < v[x+1].size()) f(n+v[x][y], x+1, y+i);
}
}
}
int main(){
s... | a.cc: In function 'int main()':
a.cc:37:60: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'const char [2]')
37 | for(int j=0; j < v[i].size(); j++) cout << v[i][j] == " ";
| ^~ ~~~
| ... |
s383584357 | p00089 | C++ | #include <bits/stdc++.h>
using namespace std;
vector<vector<int>> v;
int ret = 0;
void f(int n, int x, int y){
if(x == v.size()-1) ret = max(ret, n+v[x][y]);
else {
for(int i=0; i <= 1; i++){
if(0 <= y+i && y+i < v[x+1].size()) f(n+v[x][y], x+1, y+i);
}
}
}
int main(){
s... | a.cc: In function 'int main()':
a.cc:37:60: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'const char [2]')
37 | for(int j=0; j < v[i].size(); j++) cout << v[i][j] == " ";
| ^~ ~~~
| ... |
s080373404 | p00089 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
using namespace std;
int d[10000];
int dp[100];
int dpw[100];
char w[1000];
int main()
{
int n = 0;
while(NULL != gets(w))
{
char* p = strtok(w,",");
d[n] = atoi(p);
n++;
while(NULL != (p = strtok(NULL,",")))
{
d[n] = atoi(p);
n++;
}
... | a.cc: In function 'int main()':
a.cc:17:23: error: 'gets' was not declared in this scope; did you mean 'getw'?
17 | while(NULL != gets(w))
| ^~~~
| getw
a.cc:19:27: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
19 | ... |
s878271437 | p00089 | C++ | using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Diagnostics;
using System.Threading;
class Program
{
public const int Inf = 1 << 29;
private static int[,] dp = new int[100,100];
private static int[,... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Text;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Collections;
... |
s285009278 | p00089 | C++ | using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Diagnostics;
using System.Threading;
class Program
{
public const int Inf = 1 << 29;
private static int[,] dp = new int[100,100];
private static int[,... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Text;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Collections;
... |
s413859239 | p00089 | C++ | #include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
string s; vector<vector<int> > v; int s[100][100], dp[100][100];
vector<int> parse(string s) {
vector<int> ret; int v = 0;
for(int i = 0; i < s.size(); i++) {
if(s[i] == ',') ret.push_back(v), v = 0;
else v = v * 10 ... | a.cc:6:39: error: conflicting declaration 'int s [100][100]'
6 | string s; vector<vector<int> > v; int s[100][100], dp[100][100];
| ^
a.cc:6:8: note: previous declaration as 'std::string s'
6 | string s; vector<vector<int> > v; int s[100][100], dp[100][100];
| ... |
s120193941 | p00089 | C++ | #include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
string s; vector<vector<int> > v; int t[100][100], dp[100][100];
vector<int> parse(string s) {
vector<int> ret; int v = 0;
for(int i = 0; i < s.size(); i++) {
if(s[i] == ',') ret.push_back(v), v = 0;
else v = v * 10 ... | a.cc: In function 'int main()':
a.cc:29:12: error: 'i' was not declared in this scope
29 | dp[i][j] = s[i][j];
| ^
a.cc:29:15: error: 'j' was not declared in this scope
29 | dp[i][j] = s[i][j];
| ^
|
s362286381 | p00089 | C++ | #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
??
int cnt[100];
int d[100][100];
int dp[100][100];
??
int main() {
????????string s;
????????int n;
????????for (n = 0; cin >> s; n++) {
????????????????s += ',';
????????????????stringstream ss(s);
????????????????char c;
??????????????... | a.cc:4:1: error: expected unqualified-id before '?' token
4 | ??
| ^
a.cc:8:1: error: expected unqualified-id before '?' token
8 | ??
| ^
|
s497422418 | p00089 | C++ | import java.util.*;
class Main{
public static void main(String args[]){
int table[][]=new int[100][100];
int dp[][]=new int[100][100];
Scanner s=new Scanner(System.in);
int count=0;
for(int i=0;i<100;i++)
for(int j=0;j<100;j++)
table[i][j]=dp[i][j]=0;
while(s.hasNext()){
String str=s.next();
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:15: error: expected ':' before 'static'
3 | public static void main(String args[]){
| ^~~~~~~
| :
a.cc:3:... |
s778589898 | p00089 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
using namespace std;
type... | a.cc: In function 'int main()':
a.cc:37:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
37 | for(y=0;gets(s);y++){
| ^~~~
| getw
|
s482492678 | p00089 | C++ | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int data[100][100];
int main()
{
memset(data, 0, sizeof(data));
char buf[512];
int yy = 0;
while (!cin.eof())
{
cin.getline(buf, sizeof(buf));
if (strlen(buf) == 0)
break;
int xx = 1;
for (char* p = strtok(buf, ","); p !=... | a.cc: In function 'int main()':
a.cc:12:16: error: reference to 'data' is ambiguous
12 | memset(data, 0, sizeof(data));
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/1... |
s153232474 | p00089 | C++ | #include <iostream>
#include <string>
#include <sstream>
using namespace std;
const int SIZE = 50;
int main(){
char c;
string s;
int n, max = 0;
int* table = new int[ SIZE + 1 ]();
while ( cin >> s ){
int* input = new int[ SIZE + 1 ]();
bool isInt = true;
int cnt = 0;
istringstream is( s );
while ( !... | a.cc: In function 'int main()':
a.cc:39:25: error: 'isEnd' was not declared in this scope
39 | isEnd = !isEnd;
| ^~~~~
|
s439241114 | p00089 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<string>
#include<vector>
#include<cmath>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int dp[101][101];
int hisi[101][101];
int main()
{
int temp=0;
char t;
string s;
vector<int> nums;
while(cin>>s)
{
... | a.cc: In function 'int main()':
a.cc:52:23: error: expected '}' at end of input
52 | x = dan-hen+1;
| ^
a.cc:50:5: note: to match this '{'
50 | {
| ^
a.cc:52:23: error: expected '}' at end of input
52 | x = dan-hen+1;
| ^
a.c... |
s474643202 | p00089 | C++ | //============================================================================
// Name : TopCoderCompetition.cpp
// Author : taguchi
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//=====================================================================... | a.cc:75:17: error: extended character is not valid in an identifier
75 | cout << res@ endl;
| ^
a.cc:75:21: error: stray '@' in program
75 | cout << res@ endl;
| ^
a.cc:75:22: error: extended character is not valid in an identifier
7... |
s560078907 | p00089 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <numeric>
using namespace std;
#define P pair<int,int>
#define rep(i,n) for(int i = 0;i<n;i++)
#define pb(n) push_back(n)
typedef unsigned int uint;
typedef long long ll;
typedef ... | a.cc: In function 'int main()':
a.cc:45:64: error: expected '}' at end of input
45 | while(!((getline(cin,s),s.length()) == 1 && cnt != 0)){
| ~^
a.cc:45:64: error: expected '}' at end of input
a.cc:39:11: note: to match this '{'
39 | int... |
s280725373 | p00089 | C++ | #include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
char c[202];
char *cp;
int n[102][102],i,j,k,m=0,p,an=0;
memset(n,0,sizeof(n));
while(gets(c)!=NULL) {
cp=c; k=1; p=0;
while(p<strlen(c)) {
n[m+1][k++]=atoi(cp);
while(c[p]!=',' && p<strlen(c)) p++;
... | a.cc: In function 'int main()':
a.cc:11:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | while(gets(c)!=NULL) {
| ^~~~
| getw
|
s699543538 | p00089 | C++ | #include <iostream>
#include <cstdlib>
#include <sstream>
#include <algorithm>
using namespace std;
int d[50][100],dp[50][100];
int main() {
string str;
int l=0;
memset(d,-1,sizeof(d));
memset(dp,-1,sizeof(d));
while(cin>>str) {
replace(str.begin(),str.end(),',',' ');
stringstream sstr(str);
int i=0;
wh... | a.cc: In function 'int main()':
a.cc:13:9: error: 'memset' was not declared in this scope
13 | memset(d,-1,sizeof(d));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <algorithm>
+++ |+#include <cstri... |
s963827106 | p00089 | C++ | #include <iostream>
#include <string>
#define L 100
using namespace std;
int main(void)
{
int i1,i2,i3;
int c;
string s;
int f[L][L];
int dp[L][L];
c=0;
memset(f,-1,sizeof(f));
memset(dp,0,sizeof(dp));
while(1){
cin>>s;
for(i1=0,i2=0;i1<s.size();i1+=2,i2++){
f[c][i2]=s[i1]-48;
}
c++;
if(c!... | a.cc: In function 'int main()':
a.cc:17:9: error: 'memset' was not declared in this scope
17 | memset(f,-1,sizeof(f));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstrin... |
s622869669 | p00089 | C++ | #include <iostream>
#include <string>
#include <string.h>
#include <sstream>
#define L 110
using namespace std;
int main(void)
{
int i1,i2,i3;
int c;
string s;
string temp;
int f[L][L];
int dp[L][L];
c=0;
memset(f,-1,sizeof(f));
memset(dp,0,sizeof(dp));
while(1){
cin>>s;
temp="";
s=s+",";
for... | a.cc: In function 'int main()':
a.cc:39:28: error: 'count' was not declared in this scope
39 | if(c!=1 && count(s.begin(),s.end(),',')==1) break;
| ^~~~~
|
s591767877 | p00089 | C++ | #include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
static const int margin = 1;
int main() {
char input[128][512];
int vertex[128][64];
int line;
for(line = 0; fgets(input[line], 512, stdin) != NULL; line++);
memset(vertex, 0, sizeof(vertex));
for(int i = 0; i < line; i++) {
for... | a.cc: In function 'int main()':
a.cc:14:9: error: 'memset' was not declared in this scope
14 | memset(vertex, 0, sizeof(vertex));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#inc... |
s161179192 | p00089 | C++ | #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
... | a.cc:35:1: error: extended character is not valid in an identifier
35 | memset(coor,0,sizeof(coor));
| ^
a.cc:35:1: error: extended character is not valid in an identifier
a.cc: In function 'int main()':
a.cc:35:1: error: '\U00003000\U00003000' was not declared in this scope
35 | memset(coor,0,siz... |
s252835629 | p00089 | C++ | #include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
using namespace std;
int n;
int mas[101][101];
int dp[101][101];
int rec(int i,int j){
if(i == n) return 0;
if(j < 0 || mas[i][j] == -1) return -(2 << 26);
if(dp[i][j]) return dp[i][j];
int res = 0;
if(i < n/2) res = max(rec(i+1... | a.cc: In function 'int main()':
a.cc:22:3: error: 'memset' was not declared in this scope
22 | memset(mas,-1,sizeof(mas));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <algorithm>
+++ |+#include <cstring>
... |
s208381904 | p00090 | Java | import java.util.*;
public class Maiin{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
int n = Integer.parseInt(str);
String[] strCor = new String[n];
String[][] strZahyo = new String[n][2];
double[][] ... | Main.java:3: error: class Maiin is public, should be declared in a file named Maiin.java
public class Maiin{
^
1 error
|
s140037745 | p00090 | Java | import java.util.*;
public class Maiin{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
int n = Integer.parseInt(str);
String[] strCor = new String[n];
String[][] strZahyo = new String[n][2];
double[][] ... | Main.java:3: error: class Maiin is public, should be declared in a file named Maiin.java
public class Maiin{
^
1 error
|
s111260960 | p00090 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner s = new Scanner(System.in);
while(true){
int num = s.nextInt();
if(num==-)break;
double[][] data = new double[num][2];
for(int i=0 ; i<num ; i++){
String[] temp = s.next().split(",");
... | Main.java:9: error: illegal start of expression
if(num==-)break;
^
1 error
|
s472494533 | p00090 | Java | 15
3.14979,8.51743
2.39506,3.84915
2.68432,5.39095
5.61904,9.16332
7.85653,4.75593
2.84021,5.41511
1.79500,8.59211
7.55389,8.17604
4.70665,4.66125
1.63470,4.42538
7.34959,4.61981
5.09003,8.11122
5.24373,1.30066
0.13517,1.83659
7.57313,1.58150
0 | Main.java:1: error: class, interface, enum, or record expected
15
^
1 error
|
s478560941 | p00090 | Java | 00.07 sec 20600 KB 90 lines 2654 bytes 2013-03-05 19:22
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
... | Main.java:1: error: class, interface, enum, or record expected
00.07 sec 20600 KB 90 lines 2654 bytes 2013-03-05 19:22
^
Main.java:93: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:94: error: class, interface, enum, or record expected
import java.io.InputStreamRe... |
s509746296 | p00090 | C | #include<stdio.h>
#include<math.h>
int N,i,j,u[100],r[100]={0},R=0;
double P[100][2];
int pa(int n){return u[n]==n?n:u[n]=pa(u[n]);}
void un(int a,int b){u[pa(a)]=pa(b);}
int dis(double a[2],double b[2])
{
double x=a[0]-b[0],y=a[1]-b[1];
return ((x*x+y*y)-4.0<=0.000001)?1:0;
}
int main()
{
for(;scanf("%d",&N),N;)... | main.c: In function 'pa':
main.c:7:36: error: lvalue required as left operand of assignment
7 | int pa(int n){return u[n]==n?n:u[n]=pa(u[n]);}
| ^
|
s528757480 | p00090 | C | 15
3.14979,8.51743
2.39506,3.84915
2.68432,5.39095
5.61904,9.16332
7.85653,4.75593
2.84021,5.41511
1.79500,8.59211
7.55389,8.17604
4.70665,4.66125
1.63470,4.42538
7.34959,4.61981
5.09003,8.11122
5.24373,1.30066
0.13517,1.83659
7.57313,1.58150
0 | main.c:1:1: error: expected identifier or '(' before numeric constant
1 | 15
| ^~
|
s014445311 | p00090 | C | #include <stdio.h>
#define SQ(x) ((x) * (x))
typedef struct {
double x;
double y;
} POINT;
int dist(POINT a, POINT b)
{
if (SQ(a.x - b.x) + SQ(a.y - b.y) > 1){
return (0);
}
return (1);
}
int max(int a, int b)
{
if (a > b){
return (a);
}
return (b);
}
int main(void)
{... | main.c: In function 'main':
main.c:41:37: error: array subscript is not an integer
41 | scanf("%lf%*c%lf", &seal[i].x, &seal[i].y);
| ^
main.c:41:49: error: array subscript is not an integer
41 | scanf("%lf%*c%lf", &seal[i].x, &seal[i].y);
| ... |
s961798742 | p00090 | C | adouble x[100],y[100],t,u,s;n,i,j,k,c;main(m){for(;m=scanf("%d",&n),i=n;printf("%d\n",m)){for(;i--;scanf("%lf,%lf",x+i,y+i));for(i=n;j=--i;)for(;j--;)if(s=(u=acos(hypot(x[j]-x[i],y[j]-y[i])/2))<9)for(t=atan2(y[j]-y[i],x[j]-x[i]);c=0,s+3;s-=2)for(k=n;k--;)hypot(x[i]+cos(t+s*u)-x[k],y[i]+sin(t+s*u)-y[k])<1.1&&++c>m?m=c:0... | main.c:1:1: error: unknown type name 'adouble'; did you mean 'double'?
1 | adouble x[100],y[100],t,u,s;n,i,j,k,c;main(m){for(;m=scanf("%d",&n),i=n;printf("%d\n",m)){for(;i--;scanf("%lf,%lf",x+i,y+i));for(i=n;j=--i;)for(;j--;)if(s=(u=acos(hypot(x[j]-x[i],y[j]-y[i])/2))<9)for(t=atan2(y[j]-y[i],x[j]-x[i]);c=0,s+3;s-=2... |
s142746987 | p00090 | C | double x[100],y[100],t,u,a,b,s;n,i,j,k,c,z;main(m){for(;m=scanf("%d",&n),z=i=n;printf("%d\n",m)){for(;!z?j=--i:scanf("%lf,%lf",x+z,y+--z))for(;!z&&j--;)for(u=acos(hypot(a=x[j]-x[i],b=y[j]-y[i])/2),s=1,t=atan2(b,a);c=0,u<9&&s+3;s-=2)for(a=x[i]+cos(b=t+s*u),b=y[i]+sin(b),k=n;k--;)hypot(a-x[k],b-y[k])<1.1&&++c>m?m=c:0;} | main.c:1:32: warning: data definition has no type or storage class
1 | double x[100],y[100],t,u,a,b,s;n,i,j,k,c,z;main(m){for(;m=scanf("%d",&n),z=i=n;printf("%d\n",m)){for(;!z?j=--i:scanf("%lf,%lf",x+z,y+--z))for(;!z&&j--;)for(u=acos(hypot(a=x[j]-x[i],b=y[j]-y[i])/2),s=1,t=atan2(b,a);c=0,u<9&&s+3;s-=2)for(a=x[i]+co... |
s409058887 | p00090 | C | M=9999;main(n,i,j,k,a,b,c){
double p=atan(1)*4,X[100],Y[100],x,y;
for(;scanf("%d",&n),n;printf("%d\n",a)){
for(i=0;i<n;i++)scanf("%lf,%lf",X+i,Y+i);
for(a=i=0;i<n;i++){
for(b=k=0;k<M;k++){
x=X[i]+cos(p*k/M),y=Y[i]+sin(p*k/M);
for(c=j=0;j<n;j++){
if((X[j]-x)*(X[j]-x)+(Y[j]-y)*(Y[j]-y))<1+1e-7)c++;
... | main.c:1:1: warning: data definition has no type or storage class
1 | M=9999;main(n,i,j,k,a,b,c){
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'M' [-Wimplicit-int]
main.c:1:8: error: return type defaults to 'int' [-Wimplicit-int]
1 | M=9999;main(n,i,j,k,a,b,c){
| ^~~~
main.... |
s818748340 | p00090 | C++ | import math
while True:
n = input()
if (n == 0):
break
d = []
EPS = 10 ** (-9)
for i in range(n):
a = map(float, raw_input().split(","))
x = a[0]
y = a[1]
d.append([y,x])
ans = 1
for i in range(n):
sheets = 1
for j in range(n):
... | a.cc:1:1: error: 'import' does not name a type
1 | import math
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s635495803 | p00090 | C++ | import math
while True:
n = input()
if (n == 0):
break
d = []
EPS = 10 ** (-5)
for i in range(n):
a = map(float, raw_input().split(","))
x = a[0]
y = a[1]
d.append([y,x])
ans = 1
for i in range(n):
sheets = 1
for j in range(n):
... | a.cc:1:1: error: 'import' does not name a type
1 | import math
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s999510440 | p00090 | C++ | #define _USE_MATH_DEFINES
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
using namespace std;
#define EPS 1e-8
#define INF 1000000
struct Point{
... | a.cc: In function 'int ccw(Point, Point, Point)':
a.cc:85:14: error: 'v1' was not declared in this scope; did you mean '__pstl::execution::v1'?
85 | if(cross(v1,v2)>EPS) return +1; //a->b->c 縺悟渚譎りィ亥屓繧? if(cross(v1,v2)<-EPS) return -1; //a->b->c 縺梧凾險亥屓繧? if(dot(v1,v2)<-EPS) return +2; //c縺径-b繧医j蠕後m c<-a->b
... |
s272749723 | p00090 | C++ | #define _USE_MATH_DEFINES
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
using namespace std;
#define EPS 1e-8
#define INF 1000000
struct Point{
... | a.cc: In function 'int ccw(Point, Point, Point)':
a.cc:85:14: error: 'v1' was not declared in this scope; did you mean '__pstl::execution::v1'?
85 | if(cross(v1,v2)>EPS) return +1; //a->b->c 縺悟渚譎りィ亥屓繧? if(cross(v1,v2)<-EPS) return -1; //a->b->c 縺梧凾險亥屓繧? if(dot(v1,v2)<-EPS) return +2; //c縺径-b繧医j蠕後m c<-a->b
... |
s934893976 | p00090 | C++ | #include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
// ------ Classes ------ //
class Point {
public:
long double px, py;
Point() : px(0), py(0) {};
Point(long double px_, long double py_) : px(px_), py(py_) {};
bool operator==(const Point& p) const { return px == p.px ... | a.cc: In function 'int main()':
a.cc:78:56: error: invalid initialization of reference of type 'const Point&' from expression of type '__gnu_cxx::__alloc_traits<std::allocator<Circle>, Circle>::value_type' {aka 'Circle'}
78 | if (dst(w[k], v[l]) <= 1.0L + 1e-10) s++;
... |
s599486947 | p00090 | C++ | include<iostream>
#include<cmath>
#include<vector>
#include<algorithm>
using namespace std;
struct Point { long double px, py; };
struct Circle { Point p; long double r; };
Point pol(long double r, long double d) { return Point{ cosl(d) * r, sinl(d) * r }; }
long double arg(const Point& a) { return atan2l(a.py, a.px); ... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/cmath:45,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
16... |
s293810756 | p00090 | C++ | #include<iostream>
#include<cmath>
#include<vector>
#include<algorithm>
using namespace std;
struct Point { long double px, py; };
struct Circle { Point p; long double r; };
Point pol(long double r, long double d) { return Point{ cosl(d) * r, sinl(d) * r }; }
long double arg(const Point& a) { return atan2l(a.py, a.px);... | a.cc: In function 'int main()':
a.cc:29:38: error: conversion from 'std::pair<Point, Point>' to non-scalar type 'std::vector<Point>' requested
29 | vector<Point> z = crp(x[i], x[j]);
| ~~~^~~~~~~~~~~~
|
s670195205 | p00090 | C++ | #include <cstdio>
#include <vector>
#include <complex>
using namespace std;
#define EPS 1e-8
#define EQ(x, y) (abs((x)-(y)) < EPS)
typedef complex<double> Point;
struct Circle {
Point c;
double r;
};
int n;
Circle cs[100000];
vector<Point> CrossPointCC(Circle a, Circle b) {
vector<Point> ret;
double d = ab... | a.cc: In function 'int main()':
a.cc:59:13: error: 'Point' {aka 'class std::complex<double>'} has no member named 'X'
59 | if (p.X < 0.0 || p.X > 10.0) continue;
| ^
a.cc:59:26: error: 'Point' {aka 'class std::complex<double>'} has no member named 'X'
59 | if (p.X < 0.0 || p.X > 10.0... |
s099049305 | p00090 | C++ | #include<iostream>
#include<math.h>
using namespace std;
int n,a[101][101];
double x[101],y[101];
bool used[101];
int dfs(int x){
int res=1;
used[x]=1;
for(int i=0;i<n;i++)
if(a[x][i]&&(!used[i]))
res+=dfs(i);
return res;
}
int main(){
while(cin>>n,n){
for(int i=0;i<n;i++)
scanf("%lf,%lf",... | a.cc: In function 'int main()':
a.cc:19:5: error: 'memset' was not declared in this scope
19 | memset(a,0,sizeof(a));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<math.h>
+++ |+#include <cstring>
3 | u... |
s425926835 | p00090 | C++ | #include<iostream>
#include<math.h>
using namespace std;
int n,a[101][101];
double x[101],y[101];
bool used[101];
int dfs(int x){
int res=1;
used[x]=1;
for(int i=0;i<n;i++)
if(a[x][i]&&(!used[i]))
res+=dfs(i);
return res;
}
int main(){
while(cin>>n,n){
for(int i=0;i<n;i++)
scanf("%lf,%lf",... | a.cc: In function 'int main()':
a.cc:19:5: error: 'memset' was not declared in this scope
19 | memset(a,0,sizeof(a));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<math.h>
+++ |+#include <cstring>
3 | u... |
s755172247 | p00090 | C++ | #include<iostream>
#include<math.h>
using namespace std;
int n,a[101][101];
double x[101],y[101];
bool used[101];
int dfs(int x){
int res=1;
used[x]=1;
for(int i=0;i<n;i++)
if(a[x][i]&&(!used[i]))
res+=dfs(i);
return res;
}
int main(){
while(cin>>n,n){
for(int i=0;i<n;i++)
scanf("%lf,%lf",... | a.cc: In function 'int main()':
a.cc:19:5: error: 'memset' was not declared in this scope
19 | memset(a,0,sizeof(a));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<math.h>
+++ |+#include <cstring>
3 | u... |
s866472420 | p00090 | C++ | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <ctype.h>
#include <string>
#include <iostream>
#include <vector>
#include <stack>
#include <fstream>
#include <sstream>
#include <queue>
#include <exception>
using namespace std;
template <typename _Ty>
std::ostream& operator << (... | a.cc: In function 'double distance(Point2f, Point2f)':
a.cc:67:16: error: 'sqrt' was not declared in this scope
67 | return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
| ^~~~
a.cc: In function 'std::pair<Point2f, Point2f> intersection(Point2f, Point2f)':
a.cc:78:... |
s191222746 | p00090 | C++ | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <ctype.h>
#include <string>
#include <iostream>
#include <vector>
#include <stack>
#include <fstream>
#include <sstream>
#include <queue>
#include <exception>
using namespace std;
template <typename _Ty>
std::ostream& operator << (... | a.cc: In function 'double distance(Point2f, Point2f)':
a.cc:67:16: error: 'sqrt' was not declared in this scope
67 | return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
| ^~~~
a.cc: In function 'std::pair<Point2f, Point2f> intersection(Point2f, Point2f)':
a.cc:78:... |
s993324760 | p00090 | C++ | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... | a.cc:1:1: error: 'import' does not name a type
1 | import math
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s283191418 | p00090 | C++ | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... | a.cc:1:1: error: 'import' does not name a type
1 | import math
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s664356551 | p00090 | C++ | #include <cstdio>
#include <cmath>
#include <bitset>
using namespace std;
double x[100], y[100];
bitset<100> bits[100];
int main()
{
int n;
while (true) {
scanf("%d", &n);
if (n == 0) break;
for (int i = 0; i < n; ++i) scanf("%lf,%lf", &x[i], &y[i]);
for (int i = 0; i < n; ++i) bits[i].reset();
for (int i ... | a.cc: In function 'int main()':
a.cc:33:18: error: expected '}' at end of input
33 | return 0;
| ^
a.cc:8:1: note: to match this '{'
8 | {
| ^
|
s533544038 | p00090 | C++ | #include <iostream>
#include <cstdlib>
#include <vector>
#include <cstdio>
#include <algorithm>
#define EPS (1e-5)
using namespace std;
class Point{
public:
double x, y;
Point ( double x =0, double y=0): x(x), y(y){}
Point operator + ( Point p ){ return Point(x + p.x, y + p.y); }
Point operator - ( Point p ... | a.cc: In member function 'double Point::abs()':
a.cc:19:25: error: 'sqrt' was not declared in this scope
19 | double abs() { return sqrt(norm());}
| ^~~~
a.cc: In member function 'bool Point::operator==(const Point&) const':
a.cc:25:12: error: 'fabs' was not declared in this scope; di... |
s226120885 | p00090 | C++ | | a.cc:1:1: error: extended character is not valid in an identifier
1 |
| ^
a.cc:1:1: error: extended character is not valid in an identifier
a.cc:1:1: error: '\302\202\302\240' does not name a type
1 |
| ^~
|
s505808360 | p00090 | C++ | #include <stdio.h>
#include <list>
#include <string.h>
using namespace std;
#define SQ(x) ((x) * (x))
int n;
char G[100][100];
int check(int n)
{
int count;
int result;
bool loopflag;
bool chflag;
result = 0;
do {
loopflag = false;
result++;
do {
chflag = false;
for (int i = 0; i < n; i++){
... | a.cc: In function 'int main()':
a.cc:78:17: error: expected primary-expression before '/' token
78 | /
| ^
a.cc:79:17: error: expected primary-expression before 'for'
79 | for (int i = 0; i < n; i++){
| ^~~
a.cc:79:33: error: 'i' was not ... |
s977660774 | p00090 | C++ | #include <stdio.h>
#include <list>
#include <string.h>
#include <sort>
using namespace std;
#define SQ(x) ((x) * (x))
typedef struct {
int index;
int degree;
} SORTDATA;
int n;
char G[100][100];
int degree[100];
int ans;
int check(char use[] , int depth)
{
char next[100];
int next_count;
if (depth > ans){
... | a.cc:4:10: fatal error: sort: No such file or directory
4 | #include <sort>
| ^~~~~~
compilation terminated.
|
s563839608 | p00090 | C++ | #include <stdio.h>
#include <list>
#include <string.h>
#include <sort>
using namespace std;
#define SQ(x) ((x) * (x))
typedef struct {
int index;
int degree;
} SORTDATA;
int n;
char G[100][100];
int degree[100];
int ans;
int check(char use[] , int depth)
{
char next[100];
int next_count;
if (depth > ans){
... | a.cc:4:10: fatal error: sort: No such file or directory
4 | #include <sort>
| ^~~~~~
compilation terminated.
|
s340287704 | p00090 | C++ | #define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#inc... | a.cc: In function 'int solve()':
a.cc:263:41: error: cannot bind non-const lvalue reference of type 'P&' {aka 'point<double>&'} to an rvalue of type 'point<double>'
263 | ans = max(ans,getCnt(md + e));
| ~~~^~~
a.cc:236:15: note: initializing argument 1 of ... |
s470714014 | p00090 | C++ | #include <iostream>
#include <stack>
#include <algorithm>
#include <cstdio>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)
using namespace std;
double dist(double x1,double y1,double x2,double y2){
ret... | a.cc: In function 'int main()':
a.cc:58:97: error: 'cmk' was not declared in this scope; did you mean 'cmx'?
58 | else if( cnt[k]+ct2 >= cnt[k]*(cnt[k]-1)/2 && cnt[k] - 1 > cmx) cmk = cnt[k] -1;
| ... |
s850554274 | p00090 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<complex>
#include<iomanip>
#include<cstdio>
#include<cassert>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define EPS (1e-10)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1
#define ONLINE_BACK 2
#define ONLINE_FR... | a.cc: In function 'int main()':
a.cc:138:22: error: no matching function for call to 'sqrt(Point)'
138 | if(sqrt(c[i].p-c[j].p) >= 2.0+EPS)continue;
| ~~~~^~~~~~~~~~~~~~~
In file included from a.cc:5:
/usr/include/c++/14/complex:1195:5: note: candidate: 'template<class _Tp> std::c... |
s466072538 | p00090 | C++ | using namespace std;
//typedef pair<double,double> P;
int main()
{
int n;
for(;scanf("%d",&n),n;)
{
vector<pair<double,double> >circle;
for(int i=0;i<n;i++)
{
double tmp1,tmp2;
char buf;
cin>>tmp1>>buf>>tmp2;
circle.push_back(make_pair(tmp1,tmp2));
}
int ans=1;
for(int i=0;... | a.cc: In function 'int main()':
a.cc:6:8: error: 'scanf' was not declared in this scope
6 | for(;scanf("%d",&n),n;)
| ^~~~~
a.cc:8:7: error: 'vector' was not declared in this scope
8 | vector<pair<double,double> >circle;
| ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in heade... |
s626315077 | p00090 | C++ | while 1:
n=input()
if n==0:break
X=[]
for i in range(n):
x,y=input()
X.append(complex(x,y))
m=0
for i in range(n):
p0=X[i]
for j in range(n):
if i==j:continue
a,b=cmath.polar(p0-X[j])
if a<=2:
dx=a/2.0
dy=(1-dx**2)**.5
p1=complex(dx,dy)*cmath.e... | a.cc:1:1: error: expected unqualified-id before 'while'
1 | while 1:
| ^~~~~
|
s947754617 | p00090 | C++ | import math,cmath
while 1:
n=input()
if n==0:break
X=[]
for i in range(n):
x,y=input()
X.append(complex(x,y))
m=0
for i in range(n):
p0=X[i]
for j in range(n):
if i==j:continue
a,b=cmath.polar(p0-X[j])
if a<=2:
dx=a/2.0
dy=(1-dx**2)**.5
p1=comp... | a.cc:1:1: error: 'import' does not name a type
1 | import math,cmath
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s304876527 | p00090 | C++ | #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <c... | a.cc:69:44: error: macro "REP" passed 3 arguments, but takes just 2
69 | REP(j, i + 1, n - 1) {
| ^
a.cc:32:9: note: macro "REP" defined here
32 | #define REP(i,n) FOR(i,0,(n)-1)
| ^~~
a.cc: In function 'int main()':
a.cc:69:25... |
s630918472 | p00091 | Java | import java.io.*;
class Main{
int[] sx={0,0,1,0,-1};
int[] sy={0,1,0,-1,0};
int[] mx={0,0,1,0,-1,-1,-1,1,1};
int[] my={0,1,0,-1,0,-1,1,-1,1};
int[] sx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
int[] my={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
int total;
int res;
int[][] map=new int[10][10];
int[][] drop=new int[10][10];
static void sd... | Main.java:86: error: <identifier> expected
public staic void main(String[] args) throws IOException{
^
Main.java:110: error: ';' expected
return search(x+1,1,3)
^
2 errors
|
s423670642 | p00091 | Java | import java.io.*;
class Main{
int[] sx={0,0,1,0,-1};
int[] sy={0,1,0,-1,0};
int[] mx={0,0,1,0,-1,-1,-1,1,1};
int[] my={0,1,0,-1,0,-1,1,-1,1};
int[] sx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
int[] my={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
int total;
int res;
int[][] map=new int[10][10];
int[][] drop=new int[10][10];
static void sd... | Main.java:86: error: <identifier> expected
public staic void main(String[] args) throws IOException{
^
1 error
|
s503098470 | p00091 | Java | import java.io.*;
class Main{
int[] sx={0,0,1,0,-1};
int[] sy={0,1,0,-1,0};
int[] mx={0,0,1,0,-1,-1,-1,1,1};
int[] my={0,1,0,-1,0,-1,1,-1,1};
int[] sx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
int[] my={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
int total;
int res;
int[][] map=new int[10][10];
int[][] drop=new int[10][10];
static void sd... | Main.java:8: error: variable sx is already defined in class Main
int[] sx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
^
Main.java:9: error: variable my is already defined in class Main
int[] my={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
^
Main.java:15: error: non-static variable sx cannot be referenced from a static context
for... |
s281286373 | p00091 | Java | import java.io.*;
class Main{
int[] sx={0,0,1,0,-1};
int[] sy={0,1,0,-1,0};
int[] mx={0,0,1,0,-1,-1,-1,1,1};
int[] my={0,1,0,-1,0,-1,1,-1,1};
int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
int total;
int res;
int[][] map=new int[10][10];
int[][] drop=new int[10][10];
static void sd... | Main.java:15: error: non-static variable sx cannot be referenced from a static context
for(int i=0;i<sx.length;i++){
^
Main.java:16: error: non-static variable map cannot be referenced from a static context
map[x+sx[i]][y+sy[i]]--;
^
Main.java:16: error: non-static variable sx cannot be referenced from a ... |
s534740601 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[][] ma... | Main.java:144: error: continue outside of loop
continue;
^
Main.java:157: error: continue outside of loop
continue;
^
Main.java:170: error: continue outside of loop
continue;
^
3 errors
|
s410810587 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[][] ma... | Main.java:137: error: unreachable statement
break;
^
Main.java:149: error: unreachable statement
break;
^
Main.java:161: error: unreachable statement
break;
^
Main.java:170: error: unreachable statement
break;
^
Main.java:172: error: missing return statement
}
^
5... |
s759663017 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[][] ma... | Main.java:168: error: missing return statement
}
^
1 error
|
s402152826 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[][] ma... | Main.java:167: error: unreachable statement
break;
^
Main.java:169: error: missing return statement
}
^
2 errors
|
s559883170 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[][] ma... | Main.java:168: error: missing return statement
}
^
1 error
|
s169067122 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[][] ma... | Main.java:168: error: incompatible types: missing return value
return;
^
1 error
|
s344974949 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[][] ma... | Main.java:168: error: missing return statement
}
^
1 error
|
s519523681 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[][] ma... | Main.java:137: error: unreachable statement
break;
^
Main.java:149: error: unreachable statement
break;
^
Main.java:161: error: unreachable statement
break;
^
Main.java:170: error: unreachable statement
break;
^
Main.java:172: error: missing return statement
}
^
5 errors
|
s034898349 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[][] ma... | Main.java:168: error: missing return statement
}
^
1 error
|
s835248696 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[][] ma... | Main.java:167: error: unreachable statement
break;
^
Main.java:169: error: missing return statement
}
^
2 errors
|
s262007557 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[][] m... | Main.java:122: error: ';' expected
return false
^
1 error
|
s520635257 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[][] ... | Main.java:165: error: unreachable statement
size=3;
^
1 error
|
s648260419 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static int[... | Main.java:151: error: ')' expected
else if(mcd(x,y)&&search(x,y,2){
^
Main.java:154: error: ')' expected
else if(scd(x,y)&&search(x,y,1){
^
Main.java:168: error: ')' expected
else if(scd(x,y)&&search(x,y,1){
... |
s366357620 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static in... | Main.java:163: error: orphaned case
case 2:if(mcd(x,y)){
^
Main.java:202: error: reached end of file while parsing
}
^
2 errors
|
s724762455 | p00091 | Java | import java.io.*;
class Main{
static int[] sx={0,0,1,0,-1};
static int[] sy={0,1,0,-1,0};
static int[] mx={0,0,1,0,-1,-1,-1,1,1};
static int[] my={0,1,0,-1,0,-1,1,-1,1};
static int[] lx={0,0,1,0,-1,-1,-1,1,1,0,2,0,-2};
static int[] ly={0,1,0,-1,0,-1,1,-1,1,2,0,-2,0};
static int total;
static int res;
static in... | Main.java:102: error: ';' expected
int m=drop[i][j][k-1]
^
1 error
|
s454678529 | p00091 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:39: error: illegal start of expression
static int total,res;
^
1 error
|
s885402199 | p00091 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:41: error: illegal start of expression
static int total,res;
^
1 error
|
s323791397 | p00091 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:45: error: illegal start of expression
static void sd(int x,int y){
^
1 error
|
s874243766 | p00091 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main2 {
private static BufferedReader br = null;
static {
br = new BufferedReader(new InputStreamReader(System.in));
}
/**
* @param args
*/
public static void main(String[] args) {
// ... | Main.java:6: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s649265573 | p00091 | Java | import java.util.Stack;
import java.util.Scanner;
import java.util.TreeSet;
import java.util.Comparator;
class Sheet
{
private byte n;
private byte [][] t = new byte[10][10];
private Stack<String> st = new Stack<String>();
private final static int[][][] inkPos =
{
{
{-1, 0} , {1, 0} , {0,-1} , {0, 1}, {0,... | Main.java:152: error: ';' expected
operateInk(a,i,j,1) ){
^
Main.java:160: error: illegal start of expression
public void input()
^
2 errors
|
s299461099 | p00091 | C | int x[12],y[12],p[12],r=0;
int f(int h,int n){
int i,j,k,c;
if(n==0){
for(i=2;i<12;i++){
for(j=2;j<12;j++){
if(d[i][j])return 0;
}
}
return 1;
}
for(i=h;i<12;i++){
for(j=2;j<12;j++){
if(d[i][j]==0)continue;
for(k=2;k>-1;k--){
for(c=0;c<s[k];c++){
if(d[i+Y[k][c]][j+X[... | main.c: In function 'f':
main.c:7:12: error: 'd' undeclared (first use in this function)
7 | if(d[i][j])return 0;
| ^
main.c:7:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:19: error: 's' undeclared (first use in this function)
16 | ... |
s907319154 | p00091 | C++ | #include <iostream>
#include <stack>
using namespace std;
#define N 10
struct point{
int x, y, size;
};
int n;
int total_drop = 0;
int cloth[N][N];
int smallx[4] = {1, -1, 0, 0};
int smally[4] = {0, 0, 1, -1};
int midx[8] = {-1, -1, -1, 0, 0, 1, 1, 1};
int midy[8] = {-1, 0, 1, -1, 1, -1, 0, 1};
int bigx[12] = {-2... | a.cc: In function 'void dfs(int, int)':
a.cc:102:17: error: 'memcpy' was not declared in this scope
102 | memcpy(cloth_cp, cloth, sizeof(cloth));
| ^~~~~~
a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #i... |
s186357210 | p00091 | C++ | def read_data():
n=input()
x=[]
for i in range(10): x.append(map(int,raw_input().split()))
return n, x
def is_area3(x,y):
if x>7 or y>5: return False
for dx in [0,1,2,1,0]:
A=P[y][x-dx:x+dx+1]
if A.count(0)>0: return False
y+=1
return True
def is_area2(x,y):
if x>7 or y>7: return Fal... | a.cc:1:1: error: 'def' does not name a type
1 | def read_data():
| ^~~
|
s968762685 | p00091 | C++ | #include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
#include<cmath>
using namespace std;
#define reps(i,f,n) for(int i=f;i<n;i++)
#define repc(i,n) for(int i=0;i<n;i++)
#define rep(i,n) reps(i,0,n)
... | a.cc: In function 'int main()':
a.cc:188:23: error: cannot bind non-const lvalue reference of type 'std::vector<P>&' to an rvalue of type 'std::vector<P>'
188 | saiki(b, 0,0, vector<P>());
| ^~~~~~~~~~~
a.cc:138:43: note: initializing argument 4 of 'bool saiki(B&, int, int, std::... |
s276681369 | p00091 | C++ | #include <vector>
#include <cstdio>
#include <cstdlib>
using namespace std;
const vector<pair<
int,
vector<vector<int>>
>>pattern={
{13,{
{0,0,1,0,0},
{0,1,1,1,0},
{1,1,1,1,1},
{0,1,1,1,0},
{0,0,1,0,0},
}},
{9,{
{1,1,1},
{1,1,1},
{1,1,1},
}},
{5,{
{0,1,0},
{1,1,1},
{0,1,0},
}},
};
vector... | a.cc:30:1: error: 'set' does not name a type
30 | set<vector<vector<int>>>se;
| ^~~
a.cc: In function 'void dfs(std::vector<std::pair<std::pair<int, int>, int> >&, int)':
a.cc:36:12: error: 'se' was not declared in this scope; did you mean 's'?
36 | if(se.find(m)!=se.end())return;
| ... |
s235402910 | p00091 | C++ | #include <vector>
#include <cstdio>
#include <cstdlib>
using namespace std;
const vector<pair<
int,
vector<vector<int>>
>>pattern={
{13,{
{0,0,1,0,0},
{0,1,1,1,0},
{1,1,1,1,1},
{0,1,1,1,0},
{0,0,1,0,0},
}},
{9,{
{1,1,1},
{1,1,1},
{1,1,1},
}},
{5,{
{0,1,0},
{1,1,1},
{0,1,0},
}},
};
vector... | a.cc:30:1: error: 'set' does not name a type
30 | set<vector<vector<int>>>se;
| ^~~
a.cc: In function 'void dfs(std::vector<std::pair<std::pair<int, int>, int> >&, int)':
a.cc:36:12: error: 'se' was not declared in this scope; did you mean 's'?
36 | if(se.find(m)!=se.end())return;
| ... |
s360975056 | p00091 | C++ | #include <vector>
#include <set>
#include <cstdio>
#include <cstdlib>
using namespace std;
const vector<pair<
int,
vector<vector<int>>
>>pattern={
{{9,2},{
{1,1,1},
{1,1,1},
{1,1,1},
}},
{{13,3},{
{0,0,1,0,0},
{0,1,1,1,0},
{1,1,1,1,1},
{0,1,1,1,0},
{0,0,1,0,0},
}},
{{5,1},{
{0,1,0},
{1,1,1},... | a.cc:28:1: error: could not convert '{{{9, 2}, {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}}, {{13, 3}, {{0, 0, 1, 0, 0}, {0, 1, 1, 1, 0}, {1, 1, 1, 1, 1}, {0, 1, 1, 1, 0}, {0, 0, 1, 0, 0}}}, {{5, 1}, {{0, 1, 0}, {1, 1, 1}, {0, 1, 0}}}}' from '<brace-enclosed initializer list>' to 'const std::vector<std::pair<int, std::vector<std... |
s313518126 | p00091 | C++ | #include <vector>
#include <set>
#include <cstdio>
#include <cstdlib>
using namespace std;
const vector<pair<
pair<int,int>,
vector<vector<int>>
>>pattern={
{{13,3},{
{0,0,1,0,0},
{0,1,1,1,0},
{1,1,1,1,1},
{0,1,1,1,0},
{0,0,1,0,0},
}},
{{9,2},{
{1,1,1},
{1,1,1},
{1,1,1},
}},
{{5,1},{
{0,1,0},
... | a.cc: In function 'int main()':
a.cc:74:23: error: cannot convert 'std::vector<std::pair<std::pair<int, int>, int> >' to 'int'
74 | dfs(0,0,0,N,0,v,s);
| ^
| |
| std::vector<std::pair<std::pair<int, int>, int> >
a.cc:32:46: n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.