submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s169949453
p00754
C++
#include<iostream> #include<string> #include<stack> using namespace std; int main(void){ string s; stack<char> str; while(getline(cin,s) && s!="."){ string ch; for(int i=0;i<s.length;i++) if(s[i]=='{' || s[i]=='(' || s[i]=='}' || s[i]==')')ch+=s[i]; for(int i=0;i<ch.length();i++){ ...
a.cc: In function 'int main()': a.cc:14:21: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns...
s260626691
p00754
C++
#include<iostream> #include<string> #include<stack> using namespace std; int main(void){ string s; stack<char> str; while(getline(cin,s) && s!="."){ string ch; for(int i=0;i<s.length;i++) if(s[i]=='{' || s[i]=='(' || s[i]=='}' || s[i]==')')ch+=s[i]; for(int i=0;i<ch.length();i++){ ...
a.cc: In function 'int main()': a.cc:14:21: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns...
s459244151
p00754
C++
#include<iostream> #include<string> #include<stack> using namespace std; int main(void){ string s; stack<char> str; while(getline(cin,s) && s!="."){ flag = true; string ch; for(int i=0;i<s.size();i++) if(s[i]=='{' || s[i]=='(' || s[i]=='}' || s[i]==')')ch+=s[i]; for(int i=0;i<ch.length()...
a.cc: In function 'int main()': a.cc:12:5: error: 'flag' was not declared in this scope 12 | flag = true; | ^~~~
s278852371
p00754
C++
#include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <math.h> #include <assert.h> #include <vector> #include <stack> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const double EPS = 1e-9; static const double PI = acos(-1...
a.cc: In function 'int main()': a.cc:25:10: error: 'gets' was not declared in this scope; did you mean 'getw'? 25 | while (gets(str), str[0] != '.') { | ^~~~ | getw
s744697726
p00754
C++
#include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <math.h> #include <assert.h> #include <vector> #include <stack> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const double EPS = 1e-9; static const double PI = acos(-1...
In file included from a.cc:1: a.cc: In function 'int main()': a.cc:25:21: error: invalid conversion from 'FILE*' to 'int' [-fpermissive] 25 | while (fgets(str, stdin), str[0] != '.') { | ^~~~~ | | | FILE* a.cc:25:15: error: too few argum...
s082165195
p00754
C++
import java.util.*;class Main{public static void main(String[]a){int i=0;Scanner s=new Scanner(System.in);for(;;){String t=s.nextLine(),r="";if(t.equals("."))break;for(char c:t.toCharArray()){i="()[]".indexOf(c);r+=i<0?"":i;}for(;i<99;i++)r=r.replace("01","").replace("23","");System.out.println(r.equals("")?"yes":"no")...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*;class Main{public static void main(String[]a){int i=0;Scanner s=new Scanner(System.in);for(;;){String t=s.nextLine(),r="";if(t.equals("."))break;for(char c:t.toCharArray()){i="()[]".indexOf(c);r+=i<0?"":i;}for(;i<99;i++)r=r.replace("01","").repla...
s939685892
p00754
C++
#include <iostream> #include <climits> #include <string> #include <cstring> #include <stack> using namespace std; char s[1000]; string solve() { stack<char> st; for(int i = 0; s[i] != '.'; i++) { if( s[i] == '(' ) { st.push('('); } else if( s[i] == '[' ) { st.push('['); } else if( s[i] == ')'...
a.cc: In function 'int main()': a.cc:49:16: error: 'gets' was not declared in this scope; did you mean 'getw'? 49 | while( gets(s), s[0] != '.' ) | ^~~~ | getw
s555581787
p00754
C++
#include<iostream> #include<cstdio> #include<string> #include<stack> using namespace std; int main() { //string tmp; char tmp[105]; while(1) { //cin>>tmp; gets(tmp); if(tmp[0]=='.') break; else { bool flag=true; stack<char> s; for(int i=0;tmp[i]!='.';i++) { char top=' '; if(!s.empty()...
a.cc: In function 'int main()': a.cc:14:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 14 | gets(tmp); | ^~~~ | getw
s370984754
p00754
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <stack> using namespace std; void solve(){ string s; while(getline(cin,s)&&s!="."){ stack<char> sk; bool ok=true; for(int i=0;i<s.size();i++){ if(s[i]=='(')sk.push('('); else if(s[i]=='[')sk.push('['); else if(s[i]=...
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s433841898
p00754
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <stack> using namespace std; void solve(){ string s; while(getline(cin,s)&&s!="."){ stack<char> sk; bool ok=true; for(int i=0;i<s.size();i++){ if(s[i]=='(')sk.push('('); else if(s[i]=='[')sk.push('['); else if(s[i]=...
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s766216831
p00754
C++
#include<iostream> #include<stack> using namespace std; int main(void){ char std[101]; while(1){ //入力 gets(std); if(std[0]=='.')break; //計算 stack<int> s; s.push(0); int flag=1; for(int i=0; std[i]!='.'; i++){ if (std[i]=='('){ s.push(1); }else if(std[i]=='['){ s.push(2); }else if...
a.cc: In function 'int main()': a.cc:10:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(std); | ^~~~ | getw
s810573320
p00754
C++
#include<iostream> #include<stack> #include<cstdio> using namespace std; int main(void){ char str[101]; while(1){ //入力 gets(str); if(str[0]=='.')break; //計算 stack<int> s; s.push(0); int flag=1; for(int i=0; str[i]!='.'; i++){ if (str[i]=='('){ s.push(1); }else if(str[i]=='['){ s.pus...
a.cc: In function 'int main()': a.cc:11:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(str); | ^~~~ | getw
s506513486
p00754
C++
// AOJ 1173 #include <iostream> #include <string> #include <stack> using namespace std; int main(void) { while (1){ string str; getline(cin, str); if (str == "."){ break; } stack <char> st; bool flag = true; for (int i = 0; i < str.length(); i++){ if (str[i] == '(' || str[i] == '['){ st.pu...
a.cc: In function 'int main()': a.cc:24:62: error: invalid operands of types '<unresolved overloaded function type>' and 'char' to binary 'operator==' 24 | if (st.size() == 0 || st.top == '['){ | ~~~~~~ ^~ ~~~ | ...
s731173778
p00754
C++
#include <iostream> using namespace std; int main() { int tail,c1,c2; char str[102]; int f[102]={0}; char *s; while(true) { tail=1; getline(cin, str) if(str[0]=='.') break; s=str; c1=0; c2=0; for(;!(*s == '.');s++) { if(*s=='(')...
a.cc: In function 'int main()': a.cc:13:16: error: no matching function for call to 'getline(std::istream&, char [102])' 13 | getline(cin, str) | ~~~~~~~^~~~~~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s214885464
p00754
C++
#include <iostream> #include <stack> #include <string> using namespace std; int main(){ string str; while ( 1 ){ string s = "yes"; getline( cin, str ); if ( str[0] == '.' ) break; stack<char> sta; for ( int i = 0; str[i] != '\0'; i++ ){ if ( str[i] == '(' || str[i] == '[' ){ s...
a.cc:20:33: error: stray '\23' in program 20 | if ( sta.top() == '(' ){<U+0013> | ^~~~~~~~
s115518669
p00754
C++
yes yes no no no yes yes
a.cc:1:1: error: 'yes' does not name a type 1 | yes | ^~~
s385660449
p00754
C++
#include <iostream> using namespace std; int main() { while(1){ char input[128]; int hmMaru = 0,hmKaku = 0; bool fAns = true; cin >> input; if(strcmp(input,".") == 0) break; for(int i = 0;i < strlen(input);i++) { bool fEnd = false; switch(input[i]) { case '(': hmMaru++; brea...
a.cc: In function 'int main()': a.cc:13:20: error: 'strcmp' was not declared in this scope 13 | if(strcmp(input,".") == 0) | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> ...
s357389272
p00754
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<vector> #include<string> #include<map> #include<stack> using namespace std; #define reps(i,f,n) for(int i=f;i<int(n);i++) #define rep(i,n) reps(i,0,n) int main(){ while(1){ char str[111]; gets(str); if(str[0]=='.' && strlen(str)==1)break; ...
a.cc: In function 'int main()': a.cc:18:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 18 | gets(str); | ^~~~ | getw a.cc:20:35: error: 'strlen' was not declared in this scope 20 | if(str[0]=='.' && strlen(str)==1)...
s631078997
p00754
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include <map> #include <vector> #include <iostream> #include <set> #include <algorithm> using namespace std; char s[150]; int zhan[150]; bool solve(){ int len,top,i; gets(s); len=strlen(s); if(len==1 && s[0]=='.')return false; ...
a.cc: In function 'bool solve()': a.cc:28:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 28 | gets(s); | ^~~~ | getw a.cc: At global scope: a.cc:63:1: error: '\U0000675f' does not name a type 63 | 束 Back | ^~
s602792504
p00754
C++
#include<iostream> #include<cstring> using namespace std; const int limit=200; char st[limit]; int a[limit]; int main() { //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); int aa; gets(st); int n=strlen(st); while (!((st[0]=='.')&&(n==1))) { for(int i=0;i<=n;i++) { if(st[i]=='[') a[++a...
a.cc: In function 'int main()': a.cc:12:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 12 | gets(st); | ^~~~ | getw
s645651642
p00755
Java
public class ProbC { private static final int ColorNum = 6; public static void main ( String args[ ] ) { java.util.Scanner scanner = new java.util.Scanner ( System.in ); while ( true ) { int[ ][ ] panel; int h, w, c; h = scanner.nextInt ( ); w = scann...
Main.java:2: error: class ProbC is public, should be declared in a file named ProbC.java class ProbC ^ 1 error
s356075983
p00755
Java
import java.io.*; public class pannel { private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main ( String [] args ) throws IOException { new pannel().cal(); } private void cal() throws IOException { while(true){ St...
Main.java:3: error: class pannel is public, should be declared in a file named pannel.java public class pannel { ^ 1 error
s340902047
p00755
Java
import java.io.*; import java.util.*; public class circle implements Cloneable{ private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; private static boolean end = false; public static void main ( String [] args ) throws IOException { whi...
Main.java:4: error: class circle is public, should be declared in a file named circle.java public class circle implements Cloneable{ ^ 1 error
s749362526
p00755
Java
/** * */ import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; /** * @author kumar1 * */ public class ProblemC { /** *...
Main.java:19: error: class ProblemC is public, should be declared in a file named ProblemC.java public class ProblemC { ^ 1 error
s804450468
p00755
Java
package vol11; import java.util.Arrays; import java.util.Scanner; public class P1174 { static int[] D = { 1, 0, -1, 0 }; static int w, h, c; public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { h = sc.nextInt(); w = sc.nextInt(); c = sc.nextInt(); if ((h|...
Main.java:6: error: class P1174 is public, should be declared in a file named P1174.java public class P1174 ^ 1 error
s599786039
p00755
C++
#include <iostream> #include <algorithm> using namespace std; int H, W, C; int field[8][8]; int dh[] = {0, 0, 1, -1}; int dw[] = {1, -1, 0, 0}; void dfs2(int h, int w, int pc, int nc){ field[h][w] = nc; for(int i=0; i<4; i++){ int nh = h + dh[i]; int nw = w + dw[i]; if(0<=nh&&nh<H && 0...
a.cc: In function 'int dfs(int, int*)': a.cc:26:5: error: 'memcpy' was not declared in this scope 26 | memcpy(tfield, field, sizeof(field)); | ^~~~~~ a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#...
s861872940
p00755
C++
#include <iostream> #include <algorithm> using namespace std; int H,W,C; int tbl[10][10]; int dx[]={0,0,1,-1}; int dy[]={1,-1,0,0}; bool visited[10][10]; void paint(int x,int y,int c){ visited[y][x]=true; for(int i=0;i<4;++i){ int mx = x+dx[i]; int my = y+dy[i]; if(mx>=W||my>=H||mx<0||my<0) continue; ...
a.cc: In function 'int solve(int)': a.cc:44:5: error: 'memset' was not declared in this scope 44 | memset(visited,0,sizeof(visited)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#include...
s176122564
p00755
C++
#include <stdio.h> #include <algorithm> #pragma warning(disable : 4996) using namespace std; int H, W, c, a[9][9], b[9][9], g[9][9], v[9][9]; int dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, 1, 0, -1 }; int rec1(int x, int y) { int ret = 1; v[y][x] = 1; for (int i = 0; i < 4; i++) { int tx = x + dx[i], ty = y + dy[i]; i...
a.cc: In function 'void cpy(int)': a.cc:30:34: error: expected primary-expression before ')' token 30 | if (m == ) b[i][j] = g[i][j]; | ^
s211306159
p00755
C++
#include <iostream> #include <vector> #include <algotithm> #include <queue> #define REP(i,n) for(int i=0;i<(n);i++) using namespace std; const int dx[4] = {1,-1,1,-1}; const int dy[4] = {-1,-1,1,1}; const int NUMC = 6; int h,w,c; vector<vector<int> > mp; int dfs(int def_i,int def_j,int depth,int col){ int num_panel[NU...
a.cc:3:10: fatal error: algotithm: No such file or directory 3 | #include <algotithm> | ^~~~~~~~~~~ compilation terminated.
s073487463
p00755
C++
3 5 5 1 6 3 2 5 2 5 4 6 1 1 2 4 1 5 4 5 6 1 5 6 1 2 1 4 6 3 2 1 5 2 3 2 1 1 2 3 2 1 1 5 1 1 8 6 1 2 3 4 5 1 2 3 8 1 1 1 2 3 4 5 1 2 3 8 8 6 5 2 5 2 6 5 4 2 4 2 2 2 5 2 2 2 4 4 4 2 5 2 2 2 6 4 5 2 2 2 6 6 6 6 5 5 2 2 6 6 6 2 5 4 2 2 6 6 2 4 4 4 6 2 2 6 2 2 2 5 5 2 2 2 8 8 2 3 3 5 4 1 6 2 3 2 3 6 4 3 6 2 2 4 1 6 6 6 4 4 ...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 5 5 | ^
s481814193
p00755
C++
#include <iostReam> #include <cstring> #include <algorithm> using namespace std; int H,W,C; int board[8][8]; int b[8][8]; int check[8][8]; int ord[5]; int ans; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; bool in(int x, int y){ return 0 <= x && x < W && 0 <= y && y < H; } void dfs(int x, int y, int col...
a.cc:1:10: fatal error: iostReam: No such file or directory 1 | #include <iostReam> | ^~~~~~~~~~ compilation terminated.
s838735864
p00755
C++
#include <iostReam> #include <cstring> #include <algorithm> using namespace std; int H,W,C; int board[8][8]; int b[8][8]; int check[8][8]; int ord[5]; int ans; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; bool in(int x, int y){ return 0 <= x && x < W && 0 <= y && y < H; } void dfs(int x, int y, int col...
a.cc:1:10: fatal error: iostReam: No such file or directory 1 | #include <iostReam> | ^~~~~~~~~~ compilation terminated.
s396521317
p00755
C++
#include <iostReam> #include <cstring> #include <cstdlib> #include <string> #include <algorithm> using namespace std; int H,W,C; int board[8][8]; int b[8][8]; int check[8][8]; int ord[5]; int ans; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; bool in(int x, int y){ return 0 <= x && x < W && 0 <= y && y <...
a.cc:1:10: fatal error: iostReam: No such file or directory 1 | #include <iostReam> | ^~~~~~~~~~ compilation terminated.
s435438262
p00755
C++
#include <iostream> #include <algorithm> // #define DEBUG using namespace std; int h, w, c; int p[9][9]; void Coloring(int y, int x, int c, bool checked[9][9]) { if (checked[y][x]) { return; } int dy[] = { -1, 0, 1, 0 }; int dx[] = { 0, 1, 0, -1}; int ret = 0; checked[y][x] = true; for (int i = 0...
a.cc: In function 'int dfs(int, int, int*)': a.cc:74:5: error: 'memcpy' was not declared in this scope 74 | memcpy(tmp, p, sizeof(p)); | ^~~~~~ a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#includ...
s468700679
p00755
C++
#include <iostream> #include <algorithm> #include <cstring> #include <cstdlib> // #define DEBUG using namespace std; int h, w, c; int p[9][9]; void Coloring(int y, int x, int c, bool checked[9][9]) { if (checked[y][x]) { return; } int dy[] = { -1, 0, 1, 0 }; int dx[] = { 0, 1, 0, -1}; int ret = 0; ...
a.cc: In function 'int main()': a.cc:115:2: error: expected '}' at end of input 115 | } | ^ a.cc:94:12: note: to match this '{' 94 | int main() { | ^
s668044537
p00755
C++
#include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #include<cctype> #include<math.h> #include<string> #include<string.h> #include<stack> #include<queue> #include<vector> #include<utility> #include<set> #include<map> #include<stdlib.h> #include<iomanip> using namespace std; #define ll long long #d...
a.cc:117:1: error: 'v' does not name a type; did you mean 'vs'? 117 | v | ^ | vs
s226436269
p00755
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define REP(i,k,n) for(int i=k;i<(int)(n);i++) #define vi vector<int> #define pb push_back #define pii pair<int,int> #define fi first #define se second typedef long long ll; const int dx[] = {0,1,0,-1}; const int dy[] = {1,0,-1...
a.cc: In function 'int main()': a.cc:31:21: error: ordered comparison of pointer with integer zero ('int*' and 'int') 31 | if(a>0 && a[i-1] == a[i]) a[0] = -1; | ~^~ a.cc:45:37: error: expected ';' before 'int' 45 | que.push(pii(0,0));1 | ...
s037982556
p00755
C++
#include<iostream> #include<cstring> #include<algorithm> #include<map> #include<queue> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; typedef pair<int,int> P; int ans,h,e,w,dx[]={0,0,1,-1},dy[]={1,-1,0,0}; int bfs(int s[10][10]){ int cnp=1; bool visit[10][10]; memset(visit,0,sizeof(visit)); queue<P> que...
a.cc: In function 'int main()': a.cc:81:2: error: expected '}' at end of input 81 | } | ^ a.cc:69:11: note: to match this '{' 69 | int main(){ | ^
s088499652
p00755
C++
#include <iostream> #include <queue> using namespace std; int dx[] = {0, 1, 0, -1}; int dy[] = {-1, 0, 1, 0}; int h, w, c; int panel[8][8]; class node { public: int panel[8][8], tmpPanel[8][8]; int d; int area; node(int src[8][8]){ memcpy(panel, src, sizeof(panel)); memcpy(tmpPanel, panel, sizeof(panel)); ge...
a.cc: In constructor 'node::node(int (*)[8])': a.cc:15:17: error: 'memcpy' was not declared in this scope 15 | memcpy(panel, src, sizeof(panel)); | ^~~~~~ a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #...
s765963203
p00755
C++
#include<iostream> #include<string> #include<vector> #include<queue> using namespace std; int w,h,Col; typedef pair<int,int> C; typedef vector<vector<int> > P; P V; int dx[4]={0,1,0,-1}; int dy[4]={1,0,-1,0}; int res; void on(P N,int count,int c){ if(count==6) return; if(count==4) c=Col; int nc=N[0][0]; que...
a.cc: In function 'void on(P, int, int)': a.cc:26:9: error: 'memset' was not declared in this scope 26 | memset(used,false,sizeof(used)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<queue> +++ |+#...
s346970213
p00755
C++
#include <iostream> #include <queue> #include <cmath> using namespace std; typedef struct a { int x; int y; }coordin; int h,w,c; int res = 0; int maze [8][8]; int dx[4] = {1,0,-1,0}; int dy[4] = {0,1,0,-1}; void changeColor(int tmp[8][8],int color) { int originColor = tmp[0][0]; queue <coordin> q; coordin cc;...
a.cc: In function 'int dfs(int (*)[8], int)': a.cc:86:17: error: 'memcpy' was not declared in this scope 86 | memcpy(tmp_m,m,sizeof(tmp_m)); | ^~~~~~ a.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #inclu...
s727069711
p00755
C++
#include <queue> #include <iostream> #include <utility> using namespace std; int h,w,c,ans; void dfs(int dep,int a[][8]){ int x,y,dx[]={0,1,0,-1},dy[]={1,0,-1,0}; if(dep==5){ int t=1; if(c==a[0][0]){ queue<pair<int,int> > q; q.push(make_pair(0,0)); a[0][0]=-1; while(!q.empty()){ x=q.front().fir...
a.cc: In function 'void dfs(int, int (*)[8])': a.cc:33:29: warning: 'sizeof' on array function parameter 'a' will return size of 'int (*)[8]' [-Wsizeof-array-argument] 33 | memcpy(tmp,a,sizeof(a)); | ~^~ a.cc:9:22: note: declared here 9 | void dfs(int dep,int a[][8]){ ...
s407553499
p00755
C++
#include<iostream> #include<vector> #include<stack> using namespace std; vector< vector<bool> > getunion(vector< vector<int> >& base){ vector< vector<bool> > ret; stack< pair<int,int> > nxt; int xmax=base[0].size(); int ymax=base.size(); int tar=base[0][0]; int curx,cury; ret.resize(ymax); for(int i=0;i<ymax;i...
a.cc: In function 'int cal(std::vector<std::vector<int> >&, int, int)': a.cc:60:36: error: cannot bind non-const lvalue reference of type 'std::vector<std::vector<int> >&' to an rvalue of type 'std::vector<std::vector<int> >' 60 | return score(ccolor(base,target)); | ...
s548941631
p00755
C++
#include<iostream> #include<vector> #include<stack> #include<utility> using namespace std; vector< vector<bool> > getunion(vector< vector<int> >& base){ vector< vector<bool> > ret; stack< pair<int,int> > nxt; int xmax=base[0].size(); int ymax=base.size(); int tar=base[0][0]; int curx,cury; ret.resize(ymax); fo...
a.cc: In function 'int cal(std::vector<std::vector<int> >&, int, int)': a.cc:61:36: error: cannot bind non-const lvalue reference of type 'std::vector<std::vector<int> >&' to an rvalue of type 'std::vector<std::vector<int> >' 61 | return score(ccolor(base,target)); | ...
s671458256
p00755
C++
#include <iostream> #define loop(x) for(int x=1;x<=6;x++) using namespace std; void change(int[10][10],int,int,int); int count(int[10][10],int,int); int main(void){ for(int h,w,c;cin >> h >> w >> c,h||w||c;){ int fld[10][10]={0}; int max=0,tmp; for(int i=1;i<=h;i++) for(int j=1;j<=w;j++) cin >> fld[i...
a.cc: In function 'int main()': a.cc:21:25: error: 'memcpy' was not declared in this scope 21 | memcpy(cpy1,fld,sizeof(fld)); | ^~~~~~ a.cc:2:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #incl...
s368746581
p00755
C++
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> #include <vector> #include <array> #include <utility> using namespace std; typedef long long ll; #define ALL(c) begin((c)), end((c)) #define REP(i,n) for(ll i=0;i<(ll)n;++i) inline int getInt() { int s; scanf("%d", &s); return s; } #define SIZE...
a.cc: In function 'int recursion(int, Table)': a.cc:42:42: error: 'ntable' was not declared in this scope; did you mean 'Table'? 42 | if (depth > 5) return countColor(ntable, 1, 1); | ^~~~~~ | Table a.cc: In functio...
s474904459
p00755
C++
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> #include <vector> #include <array> #include <utility> using namespace std; typedef long long ll; #define ALL(c) begin((c)), end((c)) #define REP(i,n) for(ll i=0;i<(ll)n;++i) inline int getInt() { int s; scanf("%d", &s); return s; } #define SIZE...
a.cc: In function 'int main()': a.cc:58:30: error: expected ';' before 'if' 58 | cin >> h >> w | ^ | ; 59 | if (h == 0) break; | ~~ a.cc:65:25: error: 'walk' was not declared in ...
s380001035
p00755
C++
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> #include <vector> #include <array> #include <utility> using namespace std; typedef long long ll; #define ALL(c) begin((c)), end((c)) #define REP(i,n) for(ll i=0;i<(ll)n;++i) inline int getInt() { int s; scanf("%d", &s); return s; } #define SIZ...
a.cc: In function 'int main()': a.cc:66:25: error: 'recutsion' was not declared in this scope; did you mean 'recursion'? 66 | cout << recutsion(1, table) << endl; | ^~~~~~~~~ | recursion
s914615250
p00755
C++
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> #include <vector> #include <array> #include <utility> using namespace std; typedef long long ll; #define ALL(c) begin((c)), end((c)) #define REP(i,n) for(ll i=0;i<(ll)n;++i) inline int getInt() { int s; scanf("%d", &s); return s; } #define SIZ...
a.cc: In function 'int main()': a.cc:79:30: error: expected ';' before 'if' 79 | cin >> h >> w | ^ | ; 80 | if (h == 0) break; | ~~
s394389090
p00756
Java
import java.io.*; import java.util.Scanner; public class disc { private static Scanner sc = new Scanner(System.in); class circle{ int x; int y; int r; int c; circle(Scanner sc){ this.x=sc.nextInt(); this.y=sc.nextInt(); this.r=sc.nextInt(); this.c=sc.nextInt();...
Main.java:4: error: class disc is public, should be declared in a file named disc.java public class disc { ^ 1 error
s923067743
p00756
Java
import java.io.*; import java.util.Scanner; public class disc { private static Scanner sc = new Scanner(System.in); class circle{ int x; int y; int r; int c; circle(Scanner sc){ this.x=sc.nextInt(); this.y=sc.nextInt(); this.r=sc.nextInt(); this.c=sc.nextInt();...
Main.java:4: error: class disc is public, should be declared in a file named disc.java public class disc { ^ 1 error
s577828145
p00756
Java
import java.util.Arrays; import java.util.Scanner; import java.util.Stack; public class D { public static boolean is_covered(int node, int bit, boolean[][] adj){ for(int upper = node - 1; upper >= 0; upper--){ if((bit & (1 << upper)) != 0){ continue; }else if(adj[upper][node]){ return true; } ...
Main.java:6: error: class D is public, should be declared in a file named D.java public class D { ^ 1 error
s266247906
p00756
Java
import java.awt.geom.Point2D; import java.util.*; import static java.lang.Math.*; public class Main { final Scanner sc = new Scanner(System.in); public static void main(String[] args) { new Main().init(); } void init(){ new AOJ1175(); } final int INF=1<<28; class AOJ1175{ AOJ1175(){ ccc = new Circle[...
Main.java:81: error: reached end of file while parsing } ^ 1 error
s826067711
p00756
C
#include<studio.h> int main(void){ return 0; }
main.c:1:9: fatal error: studio.h: No such file or directory 1 | #include<studio.h> | ^~~~~~~~~~ compilation terminated.
s999003387
p00756
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define rep(i,n) repl(i,0,n) #define max(x,y) x>y?x:y #define bool int #define false 0 #define true 1 int n; int x[111],y[111],r[111],c[111]; bool used[111]; char mem[1<<24]; bool judg...
/usr/bin/ld: /tmp/cchfwFLn.o: in function `judge': main.c:(.text+0x8f): undefined reference to `pow' /usr/bin/ld: main.c:(.text+0xe7): undefined reference to `pow' /usr/bin/ld: main.c:(.text+0x148): undefined reference to `pow' /usr/bin/ld: main.c:(.text+0x1f1): undefined reference to `pow' /usr/bin/ld: main.c:(.text+0...
s228151302
p00756
C
#include <stdio.h> #include <math.h> #define REP(i, a, n) for(int i = (a); i < (n); i++) int N, X[24], Y[24], R[24], C[24]; int r[24], m[24]; char dp[16777216]; int f(char n, int s) { return ((s & r[n]) & m[n]) == 0; } char max(char a, char b) { return a > b ? a : b; } char dfs(int s, char n) { if(n == N) return N...
/usr/bin/ld: /tmp/ccekeyV4.o: in function `main': main.c:(.text+0x33f): undefined reference to `pow' /usr/bin/ld: main.c:(.text+0x3ee): undefined reference to `pow' /usr/bin/ld: main.c:(.text+0x446): undefined reference to `pow' /usr/bin/ld: main.c:(.text+0x49e): undefined reference to `pow' collect2: error: ld returne...
s869412755
p00756
C
#include<stdio.h> struct A { int x; int y; int r; int c; }a[30]; char dp[1<<25]; int n; inline bool cover(int qq,int x) { int tmp,i; for(i=qq-1;i>=0;i--) { if(((x>>i)&1)==0) continue; tmp=(a[qq].x-a[i].x)*(a[qq].x-a[i].x)+(a[qq].y-a[i].y)*(a[qq].y-a[i].y); if((a[qq].r+a[i...
main.c:10:8: error: unknown type name 'bool' 10 | inline bool cover(int qq,int x) { | ^~~~ main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 1 | #include<stdio.h> +++ |+#include <stdbool.h> 2 | struct A {
s367896365
p00756
C
#include<iostream> #include<fstream> #include<cstdio> #include<cmath> #include<cstdlib> #include<iomanip> #include<ctime> #include<cstring> #include<climits> #include<string> #include<vector> #include<map> #include<queue> #include<set> #include<algorithm> #include<stack> #include<deque> #include<list> #include<vector> ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s580542561
p00756
C++
def xx(x): return x * x def pop(overlaps, i, lis): for k in lis: if i > k and overlaps[i][k]: return False return True def search(disks, overlaps, lis): if len(lis) < 2: return 0 res = 0 for i in lis: if not pop(overlaps, i, lis): continue #print("OK", i) fo...
a.cc:14:10: error: invalid preprocessing directive #print 14 | #print("OK", i) | ^~~~~ a.cc:19:14: error: invalid preprocessing directive #print 19 | #print("Good", k) | ^~~~~ a.cc:41:6: error: invalid preprocessing directive #print 41 | #print(overlaps...
s429620771
p00756
C++
#include <cstdio> #include <cstring> #include <vector> const int MAXN = 30; int x[MAXN], y[MAXN], r[MAXN], c[MAXN]; bool ok[MAXN]; map<int, int> dp; int square(int x) {return x*x;} bool check(int i, int j) { int d2 = square(x[i]-x[j]) + square(y[i]-y[j]); return d2 < square(r[i]+r[j]); } int dfs(int state, ...
a.cc:8:1: error: 'map' does not name a type 8 | map<int, int> dp; | ^~~ a.cc: In function 'int dfs(int, int)': a.cc:19:9: error: 'dp' was not declared in this scope 19 | if (dp.find(state) != dp.end()) return dp[state]; | ^~ a.cc:20:5: error: 'vector' was not declared in this scope 20 ...
s910921481
p00756
C++
#include <cstdio> #include <cstring> #include <vector> const int MAXN = 30; int x[MAXN], y[MAXN], r[MAXN], c[MAXN]; bool ok[MAXN]; map<int, int> dp; int square(int x) {return x*x;} bool check(int i, int j) { int d2 = square(x[i]-x[j]) + square(y[i]-y[j]); return d2 < square(r[i]+r[j]); } int dfs(int state, ...
a.cc:8:1: error: 'map' does not name a type 8 | map<int, int> dp; | ^~~ a.cc: In function 'int dfs(int, int)': a.cc:19:9: error: 'dp' was not declared in this scope 19 | if (dp.find(state) != dp.end()) return dp[state]; | ^~ a.cc:20:5: error: 'vector' was not declared in this scope 20 ...
s859914248
p00756
C++
#include <cstdlib> #include <vector> #include <set> #include <map> #include <iostream> const int MAXN = 30; int x[MAXN], y[MAXN], r[MAXN], c[MAXN]; bool ok[MAXN]; map<int, int> dp; int square(int x) {return x*x;} bool check(int i, int j) { int d2 = square(x[i]-x[j]) + square(y[i]-y[j]); return d2 < square(r[...
a.cc:10:1: error: 'map' does not name a type 10 | map<int, int> dp; | ^~~ a.cc: In function 'int dfs(int, int)': a.cc:21:9: error: 'dp' was not declared in this scope 21 | if (dp.find(state) != dp.end()) return dp[state]; | ^~ a.cc:22:5: error: 'vector' was not declared in this scope 22...
s436279562
p00756
C++
const int MAXN = 30; int x[MAXN], y[MAXN], r[MAXN], c[MAXN]; bool ok[MAXN]; map<int, int> dp; int square(int x) {return x*x;} // i, j が重なってるかを調べる // 重なってたら true bool check(int i, int j) { int d2 = square(x[i]-x[j]) + square(y[i]-y[j]); return d2 < square(r[i]+r[j]); } int dfs(int state, int n) { int ret ...
a.cc:4:1: error: 'map' does not name a type 4 | map<int, int> dp; | ^~~ a.cc: In function 'int dfs(int, int)': a.cc:17:9: error: 'dp' was not declared in this scope 17 | if (dp.find(state) != dp.end()) return dp[state]; | ^~ a.cc:19:5: error: 'vector' was not declared in this scope 19 ...
s200403202
p00756
C++
int n; //枚数 int x[25],y[25],r[25],c[25]; //円盤 int b[25]; //各円盤の上に重なっている円盤(ビット管理) //円盤iと円盤jが重なっているかの判定 bool intersects(int i,int j){ int dist1 = pow(x[i]-x[j],2) + pow(y[i]-y[j],2); int dist2 = pow(r[i]+r[j],2); return dist2 > dist1; } //DP用 char dp[1<<24]; int main(void){ while(scanf("%d",&n),n){ rep(i,...
a.cc: In function 'bool intersects(int, int)': a.cc:7:15: error: 'pow' was not declared in this scope 7 | int dist1 = pow(x[i]-x[j],2) + pow(y[i]-y[j],2); | ^~~ a.cc: In function 'int main()': a.cc:17:9: error: 'scanf' was not declared in this scope 17 | while(scanf("%d",&n),n){ | ...
s089820084
p00756
C++
#include<iostream> #include<algorithm> #include<string> #include<queue> #include<stack> #include<map> #include<set> #include<vector> #include<complex> #include<sstream> #include<cstdio> #include<cstdlib> #include<cmath> #include<cctype> #include<cstring> #include<cassert> int n; //枚数 int x[25],y[25],r[25],c[25]; //円盤 i...
a.cc: In function 'int main()': a.cc:34:9: error: 'i' was not declared in this scope 34 | rep(i,n){ | ^ a.cc:34:5: error: 'rep' was not declared in this scope 34 | rep(i,n){ | ^~~
s754569003
p00756
C++
#include "bits/stdc++.h" #define REP(i,n) for(ll i=0;i<ll(n);++i) #define RREP(i,n) for(ll i=ll(n)-1;i>=0;--i) #define FOR(i,m,n) for(ll i=m;i<ll(n);++i) #define RFOR(i,m,n) for(ll i=ll(n)-1;i>=ll(m);--i) #define ALL(v) (v).begin(),(v).end() #define UNIQUE(v) v.erase(unique(ALL(v)),v.end()); #define INF 1000000001ll #...
a.cc:65:49: error: macro "REP" passed 3 arguments, but takes just 2 65 | REP(i, n)REP(j, i + 1, n) { | ^ a.cc:3:9: note: macro "REP" defined here 3 | #define REP(i,n) for(ll i=0;i<ll(n);++i) | ^~~ a.cc: In function 'int m...
s699988828
p00756
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int sqr(int x){ return x*x; } short mem[1<<24]; int ud[24]; int dfs(int b){ if(mem[b]>=0)return mem[b]; mem[b]=0; for(int i=0;i<4;i++){ for(int j=0;j<6;j++){ for(int k=0;k<j;k++){ int jx=i*6+j; int kx=i*6+k; if((b>>jx&...
a.cc: In function 'int dfs(int)': a.cc:23:21: error: no matching function for call to 'max(short int&, int)' 23 | mem[b]=max(mem[b],dfs(b&~(1<<jx)&~(1<<kx))+2); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/in...
s836656059
p00756
C++
#include <iostream> #include <algorithm> #include <cstring> using namespace std; int N; int x[24], y[24], r[24], c[24]; int on[24]; #define SQ(x) ((x)*(x)) inline bool isIntersect(int i, int j) { return SQ(x[j]-x[i]) + SQ(y[j]-y[i]) < SQ(r[j]+r[i]); } inline bool isValid(int i, int S) { for(int j=0; j<i; j++) {...
a.cc: In function 'int dfs(int, int)': a.cc:36:16: error: no matching function for call to 'max(char&, int)' 36 | ret = max(ret, dfs(S+(1<<i)+(1<<j), sum+2)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14...
s262832886
p00756
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; #define For(i,a,b) for(int i = a;i < b;i++) #define rep(i,n) For(i,0,n) #define all(n) n.begin(),n.end() //(x + a)^2 + (y + b)^2 <= c struct Circle{ int x, y, r; int c; Circle(){}; Circle(int x, int y, int r, int...
a.cc: In function 'int dfs(std::vector<Circle>)': a.cc:68:47: error: 'memset' was not declared in this scope 68 | bool cf[100]; memset(cf, 0, sizeof cf); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is pro...
s251889496
p00756
C++
#include<bits/stdc++.h> using namespace std; int n; int x[24],y[24],r[24],c[24]; bool memo[1<<25]; //dist(i,j)<r[i]+r[j]->ok bool ok(int a,int bit){#include<bits/stdc++.h> using namespace std; int n; int x[24],y[24],r[24],c[24]; bool memo[1<<25]; //dist(i,j)<r[i]+r[j]->ok bool ok(int a,int bit){ for(int i=0;i<a...
a.cc:9:24: error: stray '#' in program 9 | bool ok(int a,int bit){#include<bits/stdc++.h> | ^ a.cc: In function 'bool ok(int, int)': a.cc:9:25: error: 'include' was not declared in this scope 9 | bool ok(int a,int bit){#include<bits/stdc++.h> | ^~~~~~~ ...
s883396970
p00756
C++
#include<bits/stdc++.h> using namespace std; int n; int x[24],y[24],r[24],c[24]; bool memo[1<<24]; char bit_count[1<<24]; bool ok(int a,int bit){ for(int i=0;i<a;i++){ if(((bit>>i)&1)==0)continue; int dist=(x[i]-x[a])*(x[i]-x[a])+(y[i]-y[a])*(y[i]-y[a]); int sum=(r[i]+r[a])*(r[i]+r[a]); ...
a.cc: In function 'int dfs(int)': a.cc:27:27: error: expected primary-expression before '==' token 27 | if((bit>>j)&1)==0||ok(j,bit)==false||c[i]!=c[j])continue; | ^~
s577649929
p00756
C++
#include<bits/stdc++.h> using namespace std; int n; int x[24],y[24],r[24],c[24]; bool memo[1<<24]; //char bit_count[1<<24]; bool ok(int a,int bit){ for(int i=0;i<a;i++){ if(((bit>>i)&1)==0)continue; int dist=(x[i]-x[a])*(x[i]-x[a])+(y[i]-y[a])*(y[i]-y[a]); int sum=(r[i]+r[a])*(r[i]+r[a]); ...
a.cc: In function 'void init()': a.cc:56:13: error: 'bit_count' was not declared in this scope 56 | bit_count[i]++; | ^~~~~~~~~
s874303468
p00756
C++
#include<bits/stdc++.h> using namespace std; int n; int x[24],y[24],r[24],c[24]; bool memo[1<<24]; char bit_count[1<<24]; bool ok(int a,int bit){ for(int i=0;i<a;i++){ if(((bit>>i)&1)==0)continue; int dist=(x[i]-x[a])*(x[#include<bits/stdc++.h> using namespace std; int n; int x[24],y[24],r[24],c[...
a.cc:12:33: error: stray '#' in program 12 | int dist=(x[i]-x[a])*(x[#include<bits/stdc++.h> | ^ a.cc: In function 'bool ok(int, int)': a.cc:12:34: error: 'include' was not declared in this scope 12 | int dist=(x[i]-x[a])*(x[#include<bits/stdc++.h> | ...
s578809999
p00756
C++
#include<bits/stdc++.h> using namespace std; struct circle{ double x, y, r; int c; unordered_set<int> overlap; }; void calcOverlap(int n, circle *disk){ for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { int x = disk[i].x - disk[j].x, y = disk[i].y - disk[j].y; if(sqrt(x*x + y*y) +...
a.cc: In function 'int main(int, char**)': a.cc:63:4: error: expected '}' at end of input 63 | } | ^ a.cc:42:33: note: to match this '{' 42 | int main(int argc, char *argv[]){ | ^
s371565332
p00756
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> //#include<cctype> #include<climits> #include<iostream> #include<string> #include<vector> #include<map> //#include<list> #include<queue> #include<deque> #include<algorithm> //#include<numeric> #include<utility> #include<complex> //#include<memory> #in...
a.cc: In function 'char dfs(int, int)': a.cc:72:26: error: no matching function for call to 'max(int, char&)' 72 | ret = max(2+dfs(nstate, n), ret); | ~~~^~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/specfun.h:43, from /usr/include...
s520782985
p00756
C++
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int,int> pii; #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define all(a) (a).begin(),(a).end() #define vi vector<int> #define pb push_back #define INF 999999999 struct cir{ int x,y,r,c; }; bool same(cir a,cir b){ double r2 = (a....
a.cc: In function 'int main()': a.cc:53:21: error: storage size of 'dp' isn't constant 53 | static bool dp[1<<n]; | ^~
s107143379
p00756
C++
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int,int> pii; #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define all(a) (a).begin(),(a).end() #define vi vector<int> #define pb push_back #define INF 999999999 struct cir{ int x,y,r,c; }; bool same(cir a,cir b){ double r2 = (a....
a.cc:30:12: error: 'n' was not declared in this scope; did you mean 'yn'? 30 | bool dp[1<<n]; | ^ | yn a.cc: In function 'int main()': a.cc:56:20: error: 'dp' was not declared in this scope; did you mean 'dup'? 56 | rep(i,1<<n)dp[i]=false; | ^~ ...
s069021453
p00756
C++
#include <cstdio> #include <iostream> #include <cmath> #include <ctype.h> #include <string> #include <sstream> #include <iostream> #include <algorithm> #include <cstdlib> #include <map> #include <queue> #include <utility> #include <vector> #include <set> #include <list> #include <cstring> #include <stack> using na...
a.cc: In function 'int solve(std::string)': a.cc:68:33: error: no matching function for call to 'max(std::map<std::__cxx11::basic_string<char>, char>::mapped_type&, int)' 68 | m[now] = max(m[now], solve(newinput) + 2); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file ...
s675787983
p00756
C++
#include <vector> #include <iostream> #include <algorithm> using namespace std; int n, x[26], y[26], r[26], col[26], b[26][26]; short dp[16777222]; int solve(int bit) { if (dp[bit]) return dp[bit] - 1; int ret = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (col[i] != col[j]) continue ...
a.cc: In function 'int solve(int)': a.cc:11:55: error: expected ';' before 'if' 11 | if (col[i] != col[j]) continue | ^ | ; 12 | if ((bit & b[i][j...
s649431797
p00756
C++
#include <iostream> #include <vector> #include <cmath> #include <algorithm> using namespace std; vector<double> x; vector<double> y; vector<double> r; vector<double> c; int main() { while (true) { int n; cin >> n; if (n == 0) { break; } x.resize(n); y.resize(n); r.resize(n); ...
a.cc: In function 'int main()': a.cc:76:28: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<short int>, short int>::value_type&, int)' 76 | dp[bit] = max(dp[bit], dp[i] + 1); | ~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include...
s737005706
p00756
C++
#include <iostream> #include <vector> #include <set> #include <algorithm> using namespace std; struct Circle { short x; short y; short r; short c; }; bool overwrap(const Circle& c1, const Circle& c2) { const short d = c1.r + c2.r; const short R = (c1.x - c2.x) * (c1.x - c2.x) + (c1.y - c2.y) ...
cc1plus: error: '::main' must return 'int'
s355287420
p00756
C++
#include<bits/stdc++.h> using namespace std; #define INF 1e9 int main(){ while(1){ int n; cin >> n; if(!n) break; vector<int> x(n); vector<int> y(n); vector<int> r(n); vector<int> c(n); for(int i = 0; i < n; i++) cin >> x[i] >> y[i] >> r[i] >> c[i];...
a.cc:42:9: error: unterminated comment 42 | /*for(int i = 0; i < n; i++){ | ^ a.cc: In function 'int main()': a.cc:40:10: error: expected '}' at end of input 40 | } | ^ a.cc:7:13: note: to match this '{' 7 | while(1){ | ^ a.cc:40:10: error: ex...
s140921881
p00756
C++
nt n; //枚数 int x[25],y[25],r[25],c[25]; //円盤 int b[25]; //各円盤の上に重なっている円盤(ビット管理) //円盤iと円盤jが重なっているかの判定 bool intersects(int i,int j){ int dist1 = pow(x[i]-x[j],2) + pow(y[i]-y[j],2); int dist2 = pow(r[i]+r[j],2); return dist2 > dist1; } //DP用 char dp[1<<24]; int main(void){ while(scanf("%d",&n),n){ rep(i,n...
a.cc:1:1: error: 'nt' does not name a type; did you mean 'int'? 1 | nt n; //枚数 | ^~ | int a.cc: In function 'bool intersects(int, int)': a.cc:7:15: error: 'pow' was not declared in this scope 7 | int dist1 = pow(x[i]-x[j],2) + pow(y[i]-y[j],2); | ^~~ a.cc: In function 'int main...
s556830073
p00756
C++
int n; //枚数 int x[25],y[25],r[25],c[25]; //円盤 int b[25]; //各円盤の上に重なっている円盤(ビット管理) //円盤iと円盤jが重なっているかの判定 bool intersects(int i,int j){ int dist1 = pow(x[i]-x[j],2) + pow(y[i]-y[j],2); int dist2 = pow(r[i]+r[j],2); return dist2 > dist1; } //DP用 char dp[1<<24]; int main(void){ while(scanf("%d",&n),n){ rep(i,...
a.cc: In function 'bool intersects(int, int)': a.cc:7:15: error: 'pow' was not declared in this scope 7 | int dist1 = pow(x[i]-x[j],2) + pow(y[i]-y[j],2); | ^~~ a.cc: In function 'int main()': a.cc:17:9: error: 'scanf' was not declared in this scope 17 | while(scanf("%d",&n),n){ | ...
s318376625
p00756
C++
#include<iostream> #include<vector> #include<complex> #include<map> #include<cmath> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) const int N = 24; const double eps = 1e-10; typedef complex<double> P; class st{ public: P a; double r; int color; int id; bool operato...
a.cc:66:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 66 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:73:10: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double') 73 | cin>>in[i].a.real()>>in[i].a.ima...
s673069120
p00756
C++
#include<iostream> #include<vector> #include<complex> #include<map> #include<algorithm> #include<cmath> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) const int N = 24; const double eps = 1e-10; typedef complex<double> P; class st{ public: P a; double r; int color; in...
a.cc: In function 'short int search(int, st*, int)': a.cc:59:18: error: no matching function for call to 'max(short int&, int)' 59 | ret=max(ret,2+search(state|(1<<now)|(1<<next),in,n)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:...
s705761284
p00756
C++
import java.util.*; import javax.swing.Box.Filler; public class Main { Coin[] coins; Scanner sc = new Scanner(System.in); boolean[] lapped; int n; int[] state; void run() { while (true) { n = sc.nextInt(); if( n == 0 ) break; coins = new Coin[n]; lapped = new boolean[n]; for(int i=0;i<n;i++) ...
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:1: error: 'import' does not name a type 3 | import javax.swing.Box.Filler; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-t...
s141583391
p00756
C++
#include<iostream> using namespace std; struct Disc{ int x,y,r,c; Disc(int p_x,int p_y,int p_r,int p_c){ x=p_x;y=p_y;r=p_r;c=p_c; } Disc(){}; }; int n; int memo[1<<24]; bool exist[24]; Disc D[24]; int ans; bool touch(Disc a,Disc b){ return (a.r+b.r)*(a.r+b.r)>(a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y); } bool ...
a.cc: In function 'int main()': a.cc:58:17: error: 'memset' was not declared in this scope 58 | memset(memo,-1,sizeof(memo)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> ...
s752115882
p00756
C++
#include <vector> #include <iostream> #include <set> #include <algorithm> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int,int> pii; #define FOR(i,a,n) for(int i=a;i<n;++i) #define REP(i,n) FOR(i,0,n) struct disk{ int x,y,r,c,n; }; bool on(disk l,disk r){ return(pow(l.r+r.r,2.0)>...
a.cc: In function 'bool on(disk, disk)': a.cc:16:16: error: 'pow' was not declared in this scope 16 | return(pow(l.r+r.r,2.0)>pow(l.x-r.x,2.0)+pow(l.y-r.y,2.0)); | ^~~
s432058673
p00756
C++
#include <cstring> #include <algorithm> #include <iostream> using namespace std; int N, X[24], Y[24], R[24], C[24]; int no_coverd[24][1 << 26]; bool isCoverd(int i, int j) { int x = abs(X[i] - X[j]), y = abs(Y[i] - Y[j]), r = R[i] + R[j]; return ((x * x) + (y * y)) < (r * r); } bool noCoverd(int j, int s) { f...
/tmp/ccfH78sU.o: in function `dfs(int)': a.cc:(.text+0x14a): relocation truncated to fit: R_X86_64_PC32 against symbol `memo' defined in .bss section in /tmp/ccfH78sU.o a.cc:(.text+0x15e): relocation truncated to fit: R_X86_64_PC32 against symbol `memo' defined in .bss section in /tmp/ccfH78sU.o a.cc:(.text+0x29c): rel...
s607841807
p00756
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cstring> #include <stack> #include <cmath> using namespace std; const double EPS=1e-10; bool EQ(double a,double b){ return abs(a-b)<EPS; } int n; int xs[101]; int ys[101]; int rs[101]; int cs[101]; int dp[1<<24]; bool isNoCross(i...
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s389049968
p00756
C++
#include <iostream> #include <stack> #include <string> #include <vector> using namespace std; #define rep(i,n) rep2(i,0,n) #define rep2(i,m,n) for(int i=m;i<n;i++) #define pb push_back #define sz size() #define vi vector<int> int n,x[25],y[25],r[25],c[25],ans; bool v[1<<24]; int sq(int x){return x*x;} void f(int ma...
a.cc: In function 'int main()': a.cc:42:17: error: 'memset' was not declared in this scope 42 | memset(v,0,sizeof(v)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <vector> +++ |+#i...
s127741787
p00756
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; int dp[1<<24]; int n; int x[24],y[24],r[24],c[24]; int square(int a){ return a*a; } bool overlap(int i,int j){ return square(x[i]-x[j])+square(y[i]-y[j]) < square(r[i]+r[j]); } bool top(int s,int k){ for(int i=0;i<k;i++)...
a.cc: In function 'int main()': a.cc:43:17: error: 'memset' was not declared in this scope 43 | memset(dp,-1,sizeof(dp)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<algorithm> +++...
s613125764
p00756
C++
#include <stdio.h> #include <math.h> #include <string.h> #include <iostream> using namespace std; int pow2(int m){ return m * m; }; int n, m, c[24], d, p[24]; int bitnum(int n){ int cnt; cnt = 0; while(n){ if(n % 2 == 1) cnt++; n /= 2; } return cnt; } int main(void){ int x[24], y[24], r[24], i, j, k, dp...
a.cc: In function 'int main()': a.cc:50:53: error: expected ';' before '}' token 50 | m = max(m,bitnum(i)) | ^ | ; 51 | } | ~ ...
s747772745
p00756
C++
#include <stdio.h> #include <math.h> #include <string.h> #include <iostream> using namespace std; int pow2(int m){ return m * m; }; int n, m, c[24], d, p[24]; int bitnum(int n){ int cnt; cnt = 0; while(n){ if(n % 2 == 1) cnt++; n /= 2; } return cnt; } int main(void){ int x[24], y[24], r[24], i, j, k, dp...
a.cc: In function 'int main()': a.cc:50:53: error: expected ';' before '}' token 50 | m = max(m,bitnum(i)) | ^ | ; 51 | } | ~ ...
s249601409
p00756
C++
#include <iostream> #include <iomanip> #include <sstream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <cfloat> #include <vector> #include <string> #include <stack> #include <queue> #include <set> #include <map> #include <algorithm> #include <functional> #include ...
a.cc: In member function 'void Solver::dfs(std::vector<bool>)': a.cc:74:26: error: no matching function for call to 'max(int&, std::__iterator_traits<std::_Bit_iterator, void>::difference_type)' 74 | res = max( res, count( ALL( exists ), false ) ); | ~~~^~~~~~~~~~~~~~~~~~~...
s698265823
p00756
C++
#include <iostream> #include <math.h> using namespace std; const int MAX_N = 24; class Circle { public: int x, y, r, c; // 中心のxy座標、半径、色番号 }; /* 入力 */ int n; // 円盤の枚数 Circle cir[MAX_N]; // 円の情報 /* S:すでに取り除いた円の集合(bitで表す、右から円番号0,1,2,...,MAX_N) dp[S]:ここから取り除ける最大枚数 漸化式 dp[全部取り除いた] = n dp[S] = max(dp[S U 取り除いた2つの円]+2) ...
a.cc: In function 'int main()': a.cc:91:17: error: 'memset' was not declared in this scope 91 | memset(dp, -1, sizeof(dp)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <math.h> +++...
s563471671
p00756
C++
#include<iostream> #include<algorithm> #include<vector> #include<cmath> #define x first.first #define y first.second #define r second.first #define color second.second using namespace std; typedef pair<double,double> P; typedef pair<P,P> C; const double EPS = 1e-10; double dist(C a,C b){ return sqrt(pow(a.x-b.x,2...
a.cc: In function 'int main()': a.cc:33:16: error: storage size of 'dp' isn't constant 33 | static int dp[(1<<n)]; | ^~
s320149803
p00756
C++
#include <iostream> #include <algorithm> #include <vector> #include <cmath> using namespace std; #define DEBUG(x) cerr << #x << " = " << x << endl typedef double D; const D EPS = 1e-8; struct P { D x, y; P(D x_, D y_) : x(x_), y(y_) { } P() {} }; inline P operator -(const P& a, const P& b) { return P(a....
a.cc:19:33: warning: missing terminating ' character 19 | inline D inp(const P& a, const P' b) { return a.x*b.x + a.y*b.y; } | ^ a.cc:19:33: error: missing terminating ' character 19 | inline D inp(const P& a, const P' b) { return a.x*b.x + a.y*b.y; } | ...
s271496430
p00756
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: In function 'bool cover(int, int)': a.cc:49:18: error: reference to 'data' is ambiguous 49 | int xd = data[i][0]-data[j][0]; | ^~~~ In file included from /usr/include/c++/14/vector:69, from a.cc:1: /usr/include/c++/14/bits/range_access.h:344:5: note: candidates a...