submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s989489641
p03712
C
#include<stdio.h> #include<string.h> int main() { int r,a,b,c,h,i,k,t; char ch[20]; while(scanf("%d%d",&a,&b)!=EOF) { getchar(); t=1; printf("#"); for(i=1;i<=b;i++) printf("#"); printf("#\n"); t=1; for(i=1;i<=a;i++) { printf("#"); scanf("%s",&ch); printf("%s",ch); printf("#\n"); } ...
main.c: In function 'main': main.c:27:9: error: 'ret' undeclared (first use in this function) 27 | ret | ^~~ main.c:27:9: note: each undeclared identifier is reported only once for each function it appears in main.c:27:12: error: expected ';' at end of input 27 | ret | ...
s152422817
p03712
C
#include<stdio.h> #include<String.h> int main() { int r,a,b,c,h,i,k,t; char ch[20]; while(scanf("%d%d",&a,&b)!=EOF) { getchar(); t=1; printf("#"); for(i=1;i<=b;i++) printf("#"); printf("#\n"); t=1; for(i=1;i<=a;i++) { printf("#"); scanf("%s",&ch); printf("%s",ch); printf("#\n"); } ...
main.c:2:9: fatal error: String.h: No such file or directory 2 | #include<String.h> | ^~~~~~~~~~ compilation terminated.
s180052549
p03712
C
#include<stdio.h> #include<String.h> int main() { int r,a,b,c,h,i,k,t; char ch[20]; while(scanf("%d%d",&a,&b)!=EOF) { getchar(); t=1; printf("#"); for(i=1;i<=b;i++) printf("#"); printf("#\n"); t=1; for(i=1;i<=a;i++) { printf("#"); scanf("%s",&ch; printf("%s",ch); printf("#\n"); } ...
main.c:2:9: fatal error: String.h: No such file or directory 2 | #include<String.h> | ^~~~~~~~~~ compilation terminated.
s840662166
p03712
C
#include<stdio.h>char a[10000][10000];int main (){ int h,w,i,j; scanf("%d%d",&h,&w); for(i=0;i<h;i++) { scanf("%s",&a[i]); } for(i=0;i<w+1;i++) { printf("#"); } printf("#\n"); for(i=0;i<h;i++) { printf("#"); for(j=0;j<w;j++) { printf("%c",a[i][j]); } printf("#\n"); } for(i=0;i<w+1;i++) { printf("#"); } print...
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>char a[10000][10000];int main (){ int h,w,i,j; scanf("%d%d",&h,&w); for(i=0;i<h;i++) { scanf("%s",&a[i]); } for(i=0;i<w+1;i++) { printf("#"); } printf("...
s891309193
p03712
C++
#include "stdafx.h" #include <algorithm> #include <iostream> #include <sstream> #include <iomanip> #include <vector> #include <string> #include <bitset> #include <cmath> #include <map> #include <set> #define pi 3.1415926 using namespace std; int main() { int ht, wd; while (cin >> ht >> wd) { vector<string> v; ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s481733876
p03712
C
#include<stdio.h> #include<String.h> int main() { int r,a,b,c,h,i,k,t; char ch[20]; while(scanf("%d%d",&a,&b)!=EOF) { getchar(); t=1; for(i=1;i<=a;i++) { scanf("%s",&ch[t]); getchar(); t+=b; } printf("#"); for(i=1;i<=b;i++) printf("#"); printf("#\n"); t=1; for(i=1;i<=a;i++) {...
main.c:2:9: fatal error: String.h: No such file or directory 2 | #include<String.h> | ^~~~~~~~~~ compilation terminated.
s352066005
p03712
C
#include<stdio.h> #include<String.h> int main() { int r,a,b,c,h,i,k,t; char ch[20]; while(scanf("%d%d",&a,&b)!=EOF) { getchar(); t=1; for(i=1;i<=a;i++) { scanf("%s",&ch[t]); getchar(); t+=b; } printf("#"); for(i=1;i<=b;i++) printf("#"); printf("#\n"); t=1; for(i=1;i<=a;i++) {...
main.c:2:9: fatal error: String.h: No such file or directory 2 | #include<String.h> | ^~~~~~~~~~ compilation terminated.
s906539126
p03712
C
#include<Stdio.h> #include<string.h> int main() { int n,m,i,v,j; while(scanf("%d%d",&n,&m)!=EOF) { char a[n+2][m+2]; v=(n+2)*(m+2); memset(a,'#',sizeof(char)*v); for(i=1;i<=n;i++) { for(j=1;j<=m;j++) { scanf("\n%c",&a[i][j]); } } for(i=0;i<n+2;i++) { for(j=0;j<m+2;j++) { pri...
main.c:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
s871719157
p03712
C
#include<Stdio.h> #include<string.h> int main() { int n,m,i,v,j; while(scanf("%d%d",&n,&m)!=EOF) { char a[n+2][m+2]; v=(n+2)*(m+2); memset(a,'#',sizeof(char)*v); for(i=1;i<=n;i++) { for(j=1;j<=m;j++) { scanf("\n%c",&a[i][j]); } } for(i=0;i<n+2;i++) { for(j=0;j<m+2;j++) { pri...
main.c:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
s274629396
p03712
C
#include<Stdio.h> #include<string.h> int main() { int n,m,i,v,j; while(scanf("%d%d",&n,&m)!=EOF) { char a[n+2][m+2]; v=(n+2)*(m+2); memset(a,'#',sizeof(char)*v); for(i=1;i<=n;i++) { for(j=1;j<=m;j++) { scanf("\n%c",&a[i][j]); } } for(i=0;i<n+2;i++) { for(j=0;j<m+2;j++) { pri...
main.c:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
s291717359
p03712
C++
#include<Stdio.h> #include<string.h> int main() { int n,m,i,v,j; while(scanf("%d%d",&n,&m)!=EOF) { char a[n+2][m+2]; v=(n+2)*(m+2); memset(a,'#',sizeof(char)*v); for(i=1;i<=n;i++) { for(j=1;j<=m;j++) { scanf("\n%c",&a[i][j]); } } for(i=0;i<n+2;i++) { for(j=0;j<m+2;j++) { pri...
a.cc:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
s919478999
p03712
C++
#include<Stdio.h> #include<string.h> int main() { int n,m,i,v,j; while(scanf("%d%d",&n,&m)!=EOF) { char a[n+2][m+2]; v=(n+2)*(m+2); memset(a,'#',sizeof(char)*v); for(i=1;i<=n;i++) { for(j=1;j<=m;j++) { scanf("\n%c",&a[i][j]); } } for(i=0;i<n+2;i++) { for(j=0;j<m+2;j++) { pri...
a.cc:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
s576687389
p03712
C++
#include<stdio.h> int main() { int h,w;char a[200][105]; scanf("%d%d%*c",&h,&w); int i; for(i=0;i<h;i++) gets(a[i]); for(i=0;i<=w;i++) printf("#");printf("#\n"); for(i=0;i<h;i++) { printf("#"); printf("%s",a[i]); printf("#\n"); } for(i=0;i<=w;i++) printf("#");printf("#\n"); }
a.cc: In function 'int main()': a.cc:8:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | gets(a[i]); | ^~~~ | getw
s890464038
p03712
C++
#include<stdio.h> #include<String.h> int main() { int r,a,b,c,h,i,k,t; char ch[20]; while(scanf("%d%d",&a,&b)!=EOF) { getchar(); t=1; for(i=1;i<=a;i++) { scanf("%s",&ch[t]); getchar(); t+=b; } printf("#"); for(i=1;i<=b;i++) printf("#"); printf("#\n"); t=1; for(i=1;i<=a;i++) {...
a.cc:2:9: fatal error: String.h: No such file or directory 2 | #include<String.h> | ^~~~~~~~~~ compilation terminated.
s554419320
p03712
C
#include<stdio.h> #include<String.h> int main() { int r,a,b,c,h,i,k,t; char ch[20]; while(scanf("%d%d",&a,&b)!=EOF) { getchar(); t=1; for(i=1;i<=a;i++) { scanf("%s",&ch[t]); getchar(); t+=b; } printf("#"); for(i=1;i<=b;i++) printf("#"); printf("#\n"); t=1; for(i=1;i<=a;i++) {...
main.c:2:9: fatal error: String.h: No such file or directory 2 | #include<String.h> | ^~~~~~~~~~ compilation terminated.
s593838128
p03712
C
#include <stdio.h> int main(void) { int i; int h , w; char b[128][128]={0}; scanf("%d %d", &h, &w); for(i=1; i<=h;++i){ b[i][0]='#'; scanf("%s", &b[i][1]); b[i][w+1]='#'; } for(i=0;i<=w+1;++i){ b[0][i]='#'; b[h+1][i]='#'; } for(i=0;i<=h+1;++i){ printf("%s\n", b[i])); } ret...
main.c: In function 'main': main.c:19:25: error: expected ';' before ')' token 19 | printf("%s\n", b[i])); | ^ | ; main.c:19:25: error: expected statement before ')' token
s306801457
p03712
C++
#include<iostream.h> using namespace std; int main() { int H,W,arr[100][100]; cin>>H; cin>>W; for(int i=0;i<W;i++) for(int j=0;j<H;j++) { cin>>arr[i][j]; } for(int i=0;i<=W;i++) for(int j=0;j<=H;j++) {if(i==W||j==H) {cout<<"#";} else {cout<<arr[i][j];} return=0; }
a.cc:1:9: fatal error: iostream.h: No such file or directory 1 | #include<iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s453097141
p03712
C++
#include<iostream<> #include<stdio.h> #include<stdlib.h> using namespace std; int main() {int H,W,i=0; cin>>H; cout<<" "; cin>>W; char a[H][W]; for(i=0;i<H;i++) {for(int j=0;j<W;j++) {cin>>a[i][j]; } cout<<endl; } for(i=0;i<W+2;i++) cout<<'#'; for(i=0;i<H;i++) {for(int j=0;j<W;j++) {cout<<a[i][j]; } cout<<endl; } for...
a.cc:1:9: fatal error: iostream<: No such file or directory 1 | #include<iostream<> | ^~~~~~~~~~~ compilation terminated.
s402418898
p03712
C++
#include<iostream> #include<stdiuo.h> #include<stdlib.h> using namespace std; int main() {int H,W,i=0; cin>>H; cout<<" "; cin>>W; char a[H][W]; for(i=0;i<H;i++) {for(int j=0;j<W;j++) {cin>>a[i][j]; } cout<<endl; } for(i=0;i<W+2;i++) cout<<'#'; for(i=0;i<H;i++) {for(int j=0;j<W;j++) {cout<<a[i][j]; } cout<<endl; } for...
a.cc:2:9: fatal error: stdiuo.h: No such file or directory 2 | #include<stdiuo.h> | ^~~~~~~~~~ compilation terminated.
s419003201
p03712
C++
#include<iostream<> #include<stdiuo.h> #include<stdlib.h> using namespace std; int main() {int H,W,i=0; cin>>H; cout<<" "; cin>>W; char a[H][W]; for(i=0;i<H;i++) {for(int j=0;j<W;j++) {cin>>a[i][j]; } cout<<endl; } for(i=0;i<W+2;i++) cout<<'#'; for(i=0;i<H;i++) {for(int j=0;j<W;j++) {cout<<a[i][j]; } cout<<endl; } fo...
a.cc:1:9: fatal error: iostream<: No such file or directory 1 | #include<iostream<> | ^~~~~~~~~~~ compilation terminated.
s162160862
p03712
C++
#include<iostream> using namespace std; int main() { int H,W,arr[100][100]; cin>>H; cin>>W; for(int i=0;i<W;i++) for(int j=0;j<H;j++) { cin>>arr[i][j]; } for(int i=0;i<=W;i++) for(int j=0;j<=H;j++) {if(i==W||j==H) {cout<<"#";} else {cout<<arr[i][j];} return 0; }
a.cc: In function 'int main()': a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:4:1: note: to match this '{' 4 | { int H,W,arr[100][100]; | ^
s064165542
p03712
C++
#include<iostream.h> using namespace std; int main() { int H,W,arr[100][100]; cin>>H; cin>>W; for(int i=0;i<W;i++) for(int j=0;j<H;j++) { cin>>arr[i][j]; } for(int i=0;i<=W;i++) for(int j=0;j<=H;j++) {if(i==W||j==H) {cout<<"#";} else {cout<<arr[i][j];} return 0; }
a.cc:1:9: fatal error: iostream.h: No such file or directory 1 | #include<iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s735958196
p03712
C++
#include<iostream> using namespace std; int main() { int H,W,arr[100][100]; cin>>H; cin>>W; for(int i=0;i<W;i++) for(int j=0;j<H;j++) { cin>>arr[i][j]; } for(i=0;i<=W;i++) for(j=0;j<=H;j++) {if(i==W||j==H) {cout<<"#";} else {cout<<arr[i][j];} return=0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'i' was not declared in this scope 11 | for(i=0;i<=W;i++) | ^ a.cc:12:5: error: 'j' was not declared in this scope 12 | for(j=0;j<=H;j++) | ^ a.cc:17:7: error: expected primary-expression before '=' token 17 | return=0; | ^ a.cc:...
s952725702
p03712
C++
#include<iostream> #include<stdio.h> #include<stdlib.h> using namespace std; int main() {int H,W,i=0; cin>>H; cout<<" "; cin>>W; cout<<endl; char a[H][w]; for(i=0;i<H;i++) {for(int j=0;j<W;j=++) {cin>>a[i][j];} cout<<endl; } for(i=0;i<W+2;i++) cout<<'#'; for(i=0;i<H;i++) {cout<<'#'; for(int j=0;j<W;j=++) {cout<<a[i]...
a.cc: In function 'int main()': a.cc:13:12: error: 'w' was not declared in this scope 13 | char a[H][w]; | ^ a.cc:15:22: error: expected primary-expression before ')' token 15 | {for(int j=0;j<W;j=++) | ^ a.cc:16:7: error: 'a' was not declared in this scope 16 | {ci...
s375793387
p03712
C++
#include<iostream.h> using namespace std; int main() { int H,W,arr[100][100]; cin>>H; cin>>W; for(int i=0;i<W;i++) for(int j=0;j<H;j++) { cin>>arr[i][j]; } for(i=0;i<=W;i++) for(j=0;j<=H;j++) {if(i==W||j==H) {cout<<"#";} else {cout<<arr[i][j];} return=0; }
a.cc:1:9: fatal error: iostream.h: No such file or directory 1 | #include<iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s577269210
p03712
C++
#include<iostream> #include<stdio.h> #include<stdlib.h> using namespace std; int main() {int H,W; cin>>H; cout<<" "; cin>>W; char A[H][W]; for(int i=0;i<H;i++) {for(int j=0;j<W;j++) {cin>>A[i][j]; } cout<<endl; } for(i=0;i<W+2;i++) {cout<<'#';} for(int i=0;i<H;i++) {cout<<'#'; for(int j=0;j<W;j++) {cout<<A[i][j]; ...
a.cc: In function 'int main()': a.cc:21:5: error: 'i' was not declared in this scope 21 | for(i=0;i<W+2;i++) | ^ a.cc:32:5: error: 'i' was not declared in this scope 32 | for(i=0;i<W+2;i++) | ^
s402892405
p03712
C
#include<stdio.h> int main() { int h,w; char a[100][100]; for(i=0;i<h;i++) for(j=0;j<w;j++); scanf("%c",a[i][j]); for(i=0;i<h+2;i++) { for(j=0;j<w+2;j++) { if(i==0||i==(h+1)||j==0||j==w+1) printf("#"); else printf("%c",a[i-1][j-1]) } } return 0; }
main.c: In function 'main': main.c:6:5: error: 'i' undeclared (first use in this function) 6 | for(i=0;i<h;i++) | ^ main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in main.c:7:5: error: 'j' undeclared (first use in this function) 7 | for(j=0;j<w;j++); ...
s803841193
p03712
C++
#include <iostream> #include <math.h> #include <algorithm> #include <vector> #include <numeric> using namespace std; const double PI = acos(-1.0); const string ALP = "abcdefghijklmnopqrstuvwxyz"; #define EXIST(s,e) ((s).find(e)!=(s).end()) #define SORT(c) sort((c).begin(),(c).end()) #define FOR(i,a,b) for(int i=(a);i<(...
a.cc: In function 'int main()': a.cc:15:3: error: 'str' was not declared in this scope; did you mean 'std'? 15 | str s; | ^~~ | std a.cc:20:12: error: 's' was not declared in this scope 20 | cin >> s; | ^
s816591627
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int h,w; cin >>h>>w; char a[h+2][w+2] for(int i=0;i<h+2;i++) { for(int j=0;j<w+2;j++) { a[i][j]='#'; } } for(int i=1;i<h+1;i++) for(int j=1;j<w+1;j++) { cin >> a[i][j]; } ...
a.cc: In function 'int main()': a.cc:8:5: error: expected initializer before 'for' 8 | for(int i=0;i<h+2;i++) | ^~~ a.cc:8:17: error: 'i' was not declared in this scope 8 | for(int i=0;i<h+2;i++) | ^ a.cc:18:16: error: 'a' was not declared in this scope 18 | ci...
s000301006
p03712
C
#include<stdio.h> #include<string.h> int main(){ int m,n,i,j; char str[100][100]; scanf("%d%d",&m,&n); for(i=0;i<m;i++){ scanf("%s",str[i]); } for(i=0;i<n+2;i++){ printf("#"); } printf("\n"); for(i=0;i<m;i++){ printf("#"); for(j=0;j<n;j++){ printf("%c",str[...
main.c:27:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 27 | 装箱子 | ^~~~~~
s554581033
p03712
C
#include<stdio.h> #include<string.h> int main(){ int m,n,i,j; char str[100][100]; scanf("%d%d",&m,&n); for(i=0;i<m;i++){ scanf("%s",str[i]); } for(i=0;i<n+2;i++){ printf("#"); } printf("\n"); for(i=0;i<m;i++){ printf("#"); for(j=0;j<n;j++){ printf("%c",str[...
main.c:27:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 27 | 装箱子 | ^~~~~~
s155654256
p03712
C++
# -*- coding: utf-8 -*- import sys import subprocess import json import time import math import re import sqlite3 H, W = map(int, input().split()) a = [] a.append('#' * W) for i in range(H): a.append(input()) a.append('#' * W) for i in range(len(a)): a[i] = '#' + a[i] + '#' print(a[i])
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*- | ^ a.cc:3:1: error: 'import' does not name a type 3 | import sys | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
s118139543
p03712
C
#include <stdio.h> int main(){ int n,m; char ch[100][100]; scanf("%d %d",&n,&m); getchar(); for(int i=0; i<n; i++){ for(int j=0; j<m; j++){ scanf("%c",&ch[i][j]); } getchar(); } for(int i=0; i<=m+1; i++){ printf("#"); } printf("\n"); f...
main.c: In function 'main': main.c:28:5: error: expected declaration or statement at end of input 28 | return 0; | ^~~~~~
s996086584
p03712
C++
#include <bits/stdc++.h> #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define SORTR(v,n) sort(v, v+n, greater<int>()); // #define int long long // %d=>%lld #define pb push_back #define INF 1000000000 using namespace std; typedef long l...
a.cc: In function 'int main()': a.cc:32:13: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (char [101])' 32 | s[h](buf1); | ~~~~^~~~~~
s714104362
p03712
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <iostream> #include <string> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <functional> #include <cassert> typedef long long ll; using namespace std; #define debug(x) c...
a.cc: In function 'int main()': a.cc:43:21: error: expected ';' before 'printf' 43 | scanf("%s",s[i]) | ^ | ; 44 | printf("#%s#\n",s[i]); | ~~~~~~
s656765138
p03712
C++
#include <iostream> #include <string> #include <sstream> #include <algorithm> #include <vector> #include <utility> #include <functional> #include <stack> #include <queue> #include <map> #include <set> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <deque> #include <ctime> using names...
a.cc:58:35: error: extended character ’ is not valid in an identifier 58 | b[i][j] = ’#’; | ^ a.cc:58:36: error: stray '#' in program 58 | b[i][j] = ’#’; | ^ a.cc:58:37: error: extended...
s559662942
p03712
C++
#include <iostream> #include <string> #include <sstream> #include <algorithm> #include <vector> #include <utility> #include <functional> #include <stack> #include <queue> #include <map> #include <set> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <deque> #include <ctime> using names...
a.cc:58:35: error: extended character ’ is not valid in an identifier 58 | b[i][j] = ’#’; | ^ a.cc:58:36: error: stray '#' in program 58 | b[i][j] = ’#’; | ^ a.cc:58:37: error: extended...
s625148102
p03712
C++
#include <iostream> #include <string> int main () { char a[100][101], b[102][102]; int H, W; cin >> H >> W; for (int i = 0; i < H; i++) scanf("%s", a[i]); for (int i = 0; i < H + 2; i++) for (int j = 0; j < W + 2; j++) b[i][j] = '#'; for (int i = 0; i < H; i++) for (int j = 0; j < W; j++) ...
a.cc: In function 'int main()': a.cc:10:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 10 | cin >> H >> W; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ...
s872995084
p03712
C++
char a[100][101], b[102][102]; int main() { int H, W; cin >> H >> W; for (int i = 0; i < H; i++) scanf("%s", a[i]); for (int i = 0; i < H + 2; i++) for (int j = 0; j < W + 2; j++) b[i][j] = ’#’; for (int i = 0; i < H; i++) for (int j = 0; j < W; j++) b[i + 1][j + 1] = a[i][j]; for (int i = 0; i < H + 2...
a.cc:9:27: error: extended character ’ is not valid in an identifier 9 | b[i][j] = ’#’; | ^ a.cc:9:28: error: stray '#' in program 9 | b[i][j] = ’#’; | ^ a.cc:9:29: error: extended character ’ is not valid in an ide...
s072450976
p03712
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nextInt(); for(int i = 0; i <= W+1; i++) { System.out.print("#"); } System.out.println("#"); for(int j = 0; j <= H; j++) { ...
Main.java:25: error: reached end of file while parsing } ^ 1 error
s768343901
p03712
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nettInt(); for(int i = 0; i <= W; i++) { System.out.print("#"); } System.out.println("#"); for(int j = 0; j <= H; j++) { ...
Main.java:8: error: cannot find symbol int W = sc.nettInt(); ^ symbol: method nettInt() location: variable sc of type Scanner 1 error
s878159745
p03712
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nettInt(); for(int i = 0; i <= W; i++) { System.out.print(#); } System.out.println(#); for(int j = 0; j <= H; j++) { ...
Main.java:11: error: illegal character: '#' System.out.print(#); ^ Main.java:13: error: illegal character: '#' System.out.println(#); ^ Main.java:16: error: illegal character: '#' System.out.print(#); ^ Main.java:19: error: ill...
s688039380
p03712
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nettInt(); for(int i = 0, i <= W, i++) { System.out.print(#); } System.out.println(#); for(int j = 0, j <= H, j++) { ...
Main.java:10: error: ';' expected for(int i = 0, i <= W, i++) { ^ Main.java:10: error: illegal start of expression for(int i = 0, i <= W, i++) { ^ Main.java:10: error: ';' expected for(int i = 0, i <= W, i++) { ^ Main.java:11: error: illegal ...
s719144287
p03712
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nettInt(); for(i = 0, i <= W, i++) { System.out.print(#); } System.out.println(#); for(j = 0, j <= H, j++) { System.out....
Main.java:10: error: not a statement for(i = 0, i <= W, i++) { ^ Main.java:10: error: ';' expected for(i = 0, i <= W, i++) { ^ Main.java:11: error: illegal character: '#' System.out.print(#); ^ Main.java:13: error: illegal character: '#...
s706440137
p03712
C++
#include<string> #include<deque> #include<queue> #include<vector> #include<algorithm> #include<iostream> #include<set> #include<cmath> //#include<map> using namespace std; typedef long long int llint; #define mp make_pair #define mt make_tuple #define pub push_back #define puf push_front #define pob pop_back #define po...
a.cc: In function 'int main()': a.cc:37:26: error: expected ';' before 'cin' 37 | cout<<'#' | ^ | ; 38 | cin>>str; | ~~~
s788987454
p03712
C++
#include<iostream> using namespace std; int main(){]; int h,w; int i,j; cin>>h>>w; char m[102][102]; for(i=1;i<=h;i++){ for(j=1;j<=w;j++){ cin>>m[i][j]; } } for(i=0;i<=h+1;i++){ for(j=0;j<=w+1;j++){ if(i==0||j==0||i==h+1||j==w+1){ cout<<"#"; } else{ cout<<m[i][j]; } } cout<<endl;...
a.cc: In function 'int main()': a.cc:3:12: error: expected primary-expression before ']' token 3 | int main(){]; | ^
s532760011
p03712
C++
#include<iostream> using namespace std; int main(){]; int h,w; int i,j; cin>>h>>w; char m[102][102]; for(i=1;i<=h;i++){ for(j=1;j<=w;j++){ cin>>m[i][j]; } } for(i=0;i<=h+1;i++){ for(j=0;j<=w+1;j++){ if(i==0||j==0||i==h+1||j==w+1){ cout<<"#"; } else{ cout<<m[i][j]; } } cout<<endl;...
a.cc: In function 'int main()': a.cc:3:12: error: expected primary-expression before ']' token 3 | int main(){]; | ^
s537116216
p03712
C++
#include<iostream> #include<cstdio> using namespace std; char a[100][101], b[102][102]; int main() { int h, w; cin >> h >> w; for(int i = 0; i < h; i++) { scanf("%s", a[i]); } for(int i = 0; i < h+2; i++){ for(int j = 0; j < w+2; j++){ b[i][j] = '#'; } } ...
a.cc: In function 'int main()': a.cc:29:29: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::ostream' {aka 'std::basic_ostream<char>'}) 29 | cout << b[i][j] << cout; | ~~~~~~~~~~~~~~~ ^~ ~~~~ | | | | ...
s703629120
p03712
C++
#include<iostream> using namespace std; char a[100][101], b[102][102]; int main() { int h, w; cin >> h >> w; for(int i = 0; i < h; i++) { scanf("%s", a[i]); } for(int i = 0; i < h+2; i++){ for(int j = 0; j < w+2; j++){ b[i][j] = '#'; } } for(int i = 0...
a.cc: In function 'int main()': a.cc:28:29: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::ostream' {aka 'std::basic_ostream<char>'}) 28 | cout << b[i][j] << cout; | ~~~~~~~~~~~~~~~ ^~ ~~~~ | | | | ...
s825796369
p03712
C++
#include<iostream> using namespace std; char a[100][101], b[102][102]; int main() { int h, w; cin >> h >> w; for(int i = 0; i < h; i++) { scanf("%s", a[i]); } for(int i = 0; i < h+2; i++){ for(int j = 0; j < w+2; j++){ b[i][j] = '#'; } } for(int i = 0...
a.cc: In function 'int main()': a.cc:28:29: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::ostream' {aka 'std::basic_ostream<char>'}) 28 | cout << b[i][j] << cout; | ~~~~~~~~~~~~~~~ ^~ ~~~~ | | | | ...
s598600294
p03712
C++
#include <iostream> #include <string> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <complex> #include <utility> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <bitset> #include <ctime> #include <map> #include <uno...
a.cc: In function 'int main()': a.cc:73:24: error: 'W' was not declared in this scope 73 | cout << string(W + 2, '#') << endl; | ^ a.cc:74:29: error: 'H' was not declared in this scope 74 | for (int i = 0; i < H; ++i) { | ^
s242350680
p03712
C++
#include <iostream> #include <string> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <complex> #include <utility> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <bitset> #include <ctime> #include <map> #include <uno...
a.cc: In function 'int main()': a.cc:73:24: error: 'W' was not declared in this scope 73 | cout << string(W + 1, '#') << endl; | ^ a.cc:74:29: error: 'H' was not declared in this scope 74 | for (int i = 0; i < H; ++i) { | ^
s069561555
p03712
C++
#include <iostream> #include<algorithm> #include <vector> #include <complex> #include <map> using namespace std; int main() { int a,b; cin>>a>>b; int s[a+1][b+1]; s[0][0]="#"; s[a+1][b+1]="#"; for(int i=1;i<=a;++i){ for(int j=1;j<=b;++i){ cin>>s[i][j]; } } for(int i=0;i<a+1;++i){ for(int j=0;j<b+...
a.cc: In function 'int main()': a.cc:12:17: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 12 | s[0][0]="#"; | ^~~ | | | const char* a.cc:13:21: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 13 |...
s527877936
p03712
C++
#include<stdio.h> int mian(void){ int H,W; int i,j; char word[100][100]; scanf("%d %d",&H,&W); for(i = 0;i <H; i++ ){ for(j =0 ; j<W; j++){ scanf("%c",&word[i][j]); } } for(i=0;i<=H+1;i++){ for(j=0;j<=W+1;j++){ if(i == 0 || i == H){ printf("#"); }else{ if(j == 0 || j == W+1){ prinf("*"); } printf(...
a.cc: In function 'int mian()': a.cc:27:25: error: 'prinf' was not declared in this scope; did you mean 'printf'? 27 | prinf("*"); | ^~~~~ | printf
s630041483
p03712
C
#include<stdio.h> #define MAX 100 int main() { int x, y; int z; int i, j; int q, r; int check=0; char str[MAX][MAX]; q = scanf("%d %d", &x, &y); while(check<x) { r=fscanf(stdin, " "); (char *)r = fgets(str[check],sizeof(y),stdin); if (check < x) { check++; } } /* for (i = 0; i < x; i++...
main.c: In function 'main': main.c:17:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 17 | (char *)r = fgets(str[check],sizeof(y),stdin); | ^ main.c:17:27: error: lvalue required as left operand of assignment 17 | (char *)r ...
s752369266
p03712
C++
#include<bits/stdc++.h> using namespace std; char c[105][105] int main() { int w,h; cin>>w>>h; for(int i=0;i<h+2;i++) cout<<'#'; cout<<endl; for(int i=0;i<w;i++) cin>>c[i]; for(int i=0;i<w;i++) cout<<'#'<<c[i]<<'#'<<endl; for(int i=0;i<h+2;i++) cout<<'#'; cout<<endl; }
a.cc:4:1: error: expected initializer before 'int' 4 | int main() | ^~~
s900080137
p03712
C++
nums = [int(x) for x in input().split()] pic = [] for i in range(nums[0]): line = input() pic.append(line) for i in range(nums[1]+2): print("#", end="") print("\n", end="") for words in pic: print("#", end="") print(words, end="") print("#") for i in range(nums[1]+2): print("#", end="") print("\n", end="")
a.cc:1:1: error: 'nums' does not name a type 1 | nums = [int(x) for x in input().split()] | ^~~~
s949977724
p03712
C++
// // main.cpp // B_PictureFrame // // Created by user1 on 2017/05/20. // Copyright © 2017年 user1. All rights reserved. // #include <iostream> int H, W; char a[100+ 2][100 + 2]; void init(){ for(int h = 0; h<100+2; h++){ for(int w=0; w<100+2; w++){ a[h][w] = '0'; } } } void inp...
a.cc: In function 'void input()': a.cc:32:9: error: 'strcpy' was not declared in this scope 32 | strcpy(&(a[ind+1][1]), buff.c_str()); | ^~~~~~ a.cc:10:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 9 | #include <iostream> +++ |...
s682183219
p03712
C++
#include<cstdio> int main() { char a[100][100]; int H,W; while (scanf("%d %d",&H,&W)==2) { getchar(); for (int i=1;i<=H;i++) { gets(a[i]); } for (int i=0;i<=H+1;i++) { for (int j=0;j<=W+1;j++) { if (i==0|...
a.cc: In function 'int main()': a.cc:11:13: error: 'gets' was not declared in this scope; did you mean 'getw'? 11 | gets(a[i]); | ^~~~ | getw
s940423431
p03712
C++
#pragma region ヘッダー #define _CRT_SECURE_NO_WARNINGS #ifdef _____MY_DEBUG_____ #define VS_ENDPAUSE() (system("pause")) #else #define VS_ENDPAUSE() #endif #include <stdio.h> #include <iostream> #include <math.h> #include <cmath> #include <vector> #include <algorithm> using namespace std; typedef signed char int8; type...
a.cc: In function 'void func()': a.cc:58:9: error: 'memset' was not declared in this scope 58 | memset(a, '#', sizeof(a)); | ^~~~~~ a.cc:16:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 15 | #include <algorithm> +++ |+#include <...
s724045925
p03712
C++
#pragma region ヘッダー #define _CRT_SECURE_NO_WARNINGS #ifdef _____MY_DEBUG_____ #define VS_ENDPAUSE() (system("pause")) #else #define VS_ENDPAUSE() #endif #include <stdio.h> #include <iostream> #include <math.h> #include <cmath> #include <vector> #include <algorithm> using namespace std; typedef signed char int8; type...
a.cc: In function 'void func()': a.cc:57:9: error: 'memset' was not declared in this scope 57 | memset(a, '#', sizeof(a)); | ^~~~~~ a.cc:16:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 15 | #include <algorithm> +++ |+#include <...
s820063948
p03712
C++
#include<iostream> #include<string> using namespace std; char str[102][102], c; int H, W; int main(){ cin >> H >> W; for(int l = 0; l < H+2; l++){ for(int m = 0; m < W+2){ if(l == 0 || l == H+1 || m == 0 || m == W+1){ str[m][l] = '#'; }else{ cin >> c; str[m][l] = c; } } } for(int l = 0...
a.cc: In function 'int main()': a.cc:13:39: error: expected ';' before ')' token 13 | for(int m = 0; m < W+2){ | ^ | ; a.cc:24:39: error: expected ';' before ')' token 24 | for(int m = 0; m < W+...
s933005163
p03712
C++
#include<sstream> #include<fstream> #include<stdio.h> #include<algorithm> #include<string.h> #include<string> #include<queue> #include<set> #include<vector> #include<cmath> #include<ctime> #include<locale> using namespace std; char c[101][101]; int main() { long a,b; scanf("%d%d",&a,&b);gets(c[0]); for(lon...
a.cc: In function 'int main()': a.cc:19:25: error: 'gets' was not declared in this scope; did you mean 'getw'? 19 | scanf("%d%d",&a,&b);gets(c[0]); | ^~~~ | getw
s805626588
p03712
C++
#include<iostream> #include<sstream> #include<fstream> #include<stdio.h> #include<algorithm> #include<string.h> #include<string> #include<queue> #include<set> #include<vector> #include<cmath> #include<ctime> #include<locale> using namespace std; char c[101][101]; int main() { long a,b; cin>>a>>b;gets(c[0]); ...
a.cc: In function 'int main()': a.cc:19:15: error: 'gets' was not declared in this scope; did you mean 'getw'? 19 | cin>>a>>b;gets(c[0]); | ^~~~ | getw
s679491386
p03713
C++
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef vector<int> vi; typedef pair<int, int> pi; typedef vector<ll> vl; typedef long double ld; #define txt \ freopen("ip.txt", "r", stdin); \ freopen("op.txt", "w", stdout) #define a3 INT_MAX #define i3 INT_MIN #de...
a.cc: In function 'int main()': a.cc:203:15: error: cannot bind non-const lvalue reference of type 'll&' {aka 'long long int&'} to a value of type 'int' 203 | solve(t); | ^ a.cc:168:16: note: initializing argument 1 of 'void solve(ll&)' 168 | void solve(ll &t) | ~~~~^
s226851892
p03713
C++
#include <iostream> using namespace std; const long long INF = 9223372036854775807; struct data { long long min = INF, max = 0; data &update(long long x) { if (x < min) min = x; if (x > max) max = x; return *this; } long long diff() const { return max - min; } }; data operator^(const data &a, ...
a.cc:19:1: error: reference to 'data' is ambiguous 19 | data operator^(const data &a, const data &b) { | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, f...
s732572309
p03713
C++
#include<iostream> #include<string> #include<map> using namespace std; typedef long long ll; const int Max = 1e5 + 5; int lst[Max]; int main() { ll x, y; cin >> y >> x; ll res = 1e18+5; for (int i = 1;i <= x - 1;i++) { ll a = (x - i) * y; ll b = i * (y / 2); ll c = x * y - a - b; res = min(res, max(a, max...
a.cc: In function 'int main()': a.cc:20:20: error: redeclaration of 'll a' 20 | ll a = x * y; | ^ a.cc:16:20: note: 'll a' previously declared here 16 | ll a = (x - i) * y; | ^ a.cc:21:20: error: redeclaration of 'll b' 21 | ...
s682853012
p03713
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for(int i = n-1; i >= 0; i--) #define all(x) (x).begin(),(x).end() // 昇順ソート #define rall(v) (v).rbegin(), (v).rend() // 降順ソート #define FastIO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0) ty...
a.cc: In function 'int main()': a.cc:52:19: error: expected ';' before ')' token 52 | for(ll r = h/3) | ^ | ; a.cc:52:19: error: expected primary-expression before ')' token a.cc:52:19: error: expected ';' before ')' token 52 | for(ll r = h/3) | ...
s054452346
p03713
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int main() { ll h,w;cin>>h>>w; if(h%3==0 || w%3==0){ cout<<0<<endl; } else{ ll ans = h*w; rep(i,h-1){ ll ws=w/2; ll tmp=max((h-i-1)*w-abs(i+...
a.cc: In function 'int main()': a.cc:16:13: error: expected ',' or ';' before 'ans' 16 | ans=min(tmp,ans); | ^~~ a.cc:21:13: error: expected ',' or ';' before 'ans' 21 | ans=min(tmp,ans); | ^~~
s898551412
p03713
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll func(ll x, ll y, ll z) { ll maxV = max({ x,y,z }); ll minV = min({ x,y,z }); return maxV - minV; } ll main() { ll h, w; cin >> h >> w; ll ans = 2147483647; for (ll y = 1; y <= h - 1; y++) { ll sa, sb, sc; sb = w / 2 * (h - y); sc = ...
a.cc:11:1: error: '::main' must return 'int' 11 | ll main() { | ^~
s380099368
p03713
C++
/*------------------------------------ ........Bismillahir Rahmanir Rahim.... ..........created by Abdul Aziz....... ------------------------------------*/ #include <iostream> #include <algorithm> #include <stdio.h> #include <cmath> #include <vector> #include <set> #include <map> #include <cstring> #include <unordered_...
a.cc: In function 'int main()': a.cc:53:22: error: 'ans2' was not declared in this scope; did you mean 'ans1'? 53 | cout << min(ans1,ans2) << endl; | ^~~~ | ans1
s277161734
p03713
C++
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; #define MOD 1000000007 #define ALL(obj) (obj).begin(),(obj).end() template<class T>inline bool chmax(T& a,T b){if (a<b){a=b;return 1;}return 0;} template<class T>inline bool chmin(T& a,T b){if (a>b){a=b;return 1;}return 0;} ...
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Com...
s590149018
p03713
C++
include <bits/stdc++.h> using namespace std; int main(){ long long h, w; cin >> h >> w; long long ans = h*w; vector<long long> area(3); // 回転前と回転後の2通りを試す for (int i = 0; i < 2; i++){ // 1つの長方形の辺の長さを全探索する for (long long t = 1; t < h; t++){ ...
a.cc:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope 7 | cin >> h >> w; | ^~~ a.cc:11:5: error: 'vector' was not declared in this scope 11 | vector<long long> area(3)...
s874143626
p03713
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long h, w; cin >> h >> w; long long ans = h*w; vector<long long> area(3); // 回転前と回転後の2通りを試す for (int i = 0; i < 2; i++){ // 1つの長方形の辺の長さを全探索する for (long long t = 1; t < h; t++){ ...
a.cc: In function 'int main()': a.cc:20:13: error: 's' was not declared in this scope 20 | s[0] = t * w; | ^
s102308038
p03713
C++
#include <iostream> #include <unordered_map> #include <vector> #include <set> #include <string.h> #include <algorithm> #define mod 1000000007 #define inf 1LL<<61 #define ll long long #define pr pair<int,int> #define all vec.begin(),vec.end() #define rep(i,a,b) for (int i = a; i < b; i++) #define fi first #define se sec...
a.cc: In function 'int main()': a.cc:23:19: error: 'INT_MAX' was not declared in this scope 23 | ll minx = INT_MAX; | ^~~~~~~ a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 6 | #include <algorithm> +++ |+#inclu...
s289407950
p03713
C++
#include <algorithm> #include <iostream> using namespace std; using ll = long long; int main() { ll H, W; cin >> H >> W; ll ans = H * W; ll s[3]; for (int i = 0; i < 2; ++i) { for (ll h = 1; h < H; ++h) { // まずは縦割り s[0] = h * W; s[1] = (H - h) * (W / 2)...
a.cc: In function 'int main()': a.cc:33:14: error: expected '}' at end of input 33 | return 0; | ^ a.cc:7:12: note: to match this '{' 7 | int main() { | ^
s608638003
p03713
C++
#include <bits/stdc++.h> using namespace std; #define ll long long int #define rep(i, n) for(int i = 0; i < n; i++) #define sort(v) sort((v).begin(), (v).end()) using vi = vector<int>; using vs = vector<string>; using vll = vector<ll>; const int MOD = 1e9+7; int main() { ll H, W; cin >> H >> W; vll ans; if (H % ...
a.cc: In function 'int main()': a.cc:24:22: error: 'i' was not declared in this scope 24 | repp(i, H-1) { | ^ a.cc:24:17: error: 'repp' was not declared in this scope; did you mean 'rep'? 24 | repp(i, H-1) { | ^~~~ | ...
s646691919
p03713
C++
#include<bits/stdc++.h> using namespace std; #define int long long int #define pb push_back #define mp make_pair #define all(x) x.begin(), x.end() #define tr(it, a) for(auto it = a.begin(); it != a.end(); it++) typedef vector<int> vi; const int mod = 1000000007; int32_t main() { ios_base::sync_with_st...
a.cc: In function 'int32_t main()': a.cc:51:9: error: conflicting declaration 'long long int ans' 51 | int ans = ans; | ^~~ a.cc:20:11: note: previous declaration as 'float ans' 20 | float ans=INT_MAX; | ^~~
s765809499
p03713
C++
#include<bits/stdc++.h> using namespace std; #define int long long int #define pb push_back #define mp make_pair #define all(x) x.begin(), x.end() #define tr(it, a) for(auto it = a.begin(); it != a.end(); it++) typedef vector<int> vi; const int mod = 1000000007; int32_t main() { ios_base::sync_with_st...
a.cc: In function 'int32_t main()': a.cc:34:22: error: no matching function for call to 'min(long long int&, float)' 34 | ans = min(ans,max({a,b,d})-min({a,b,d})); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /u...
s318429776
p03713
C++
#include <bits/stdc++.h> using namespace std; using Graph = vector<vector<int>>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const long long X=1000000000+7; int main() { long long h,w; cin>>h>>w; if((h%3==0 || w%3==0) cout<<"0"<<endl; else{ int ans=100009; rep(i,2){ int h3=h/3,w2=w/2; ...
a.cc: In function 'int main()': a.cc:10:24: error: expected ';' before 'cout' 10 | if((h%3==0 || w%3==0) cout<<"0"<<endl; | ^~~~~ | ; a.cc:11:3: error: expected primary-expression before 'else' 11 | else{ | ^~~~ a.cc:10:41: error: expected ')' ...
s173760582
p03713
C++
#include <bits/stdc++.h> using ll = long long; #define FOR(i, k, n) for(ll i = (k); i < (n); i++) #define FORe(i, k, n) for(ll i = (k); i <= (n); i++) #define FORr(i, k, n) for(ll i = (k)-1; i > (n); i--) #define FORre(i, k, n) for(ll i = (k)-1; i >= (n); i--) #define REP(i, n) FOR(i, 0, n) #define REPr(i, n) FORre(i, ...
a.cc: In function 'int main()': a.cc:49:23: error: expected ';' before ':' token 49 | if(d < 2) continue: | ^ | ; a.cc:49:23: error: expected primary-expression before ':' token
s766300557
p03713
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s531416961
p03713
C++
#include <iostream> #include <string> #include <algorithm> #include <functional> #include <vector> #include <stack> #include <queue> #include <deque> #include <set> #include <map> #include <cstdio> #include <cmath> #include <tuple> #include <iomanip> #include <numeric> #include <unordered_map> #include <sstream> #in...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s020834905
p03713
C++
#include <iostream> #include <stdio.h> #include <set> #include <string> #include <vector> #include <map> #include <algorithm> #include <cmath> #include <limits> typedef long long int lli; #define rep(i,s,N) for(int i=s;i<N;i++) #define MOD 1000000007 using namespace std; lli small(lli a, lli b, lli c) { lli l = min(...
a.cc: In function 'lli split(lli, lli)': a.cc:24:17: error: 'LLONG_MAX' was not declared in this scope 24 | lli m = LLONG_MAX; | ^~~~~~~~~ a.cc:9:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 8 | #include <cmath> +++...
s122398842
p03713
C++
#include <iostream> #include <algorithm> #include <cstring> #include <cmath> #include <vector> #include <map> #define rep(i, a, b) for ( int i = (a); i < (b); i++ ) #define per(i, a, b) for ( int i = (b)-1; i >= (a); i--) #define pb push_back #define bg begin() #define en end() using namespace std; typedef long long...
a.cc:33:22: error: extended character   is not valid in an identifier 33 | S1 = (t/2) * x; //縦3分割 | ^ a.cc: In function 'll calc(ll, ll)': a.cc:33:22: error: '\U00003000' was not declared in this scope 33 | S1 = (t/2) * x; //縦3分割 | ^~
s942681350
p03713
C++
.
a.cc:1:1: error: expected unqualified-id before '.' token 1 | . | ^
s696417396
p03713
C++
#include<iostream> #include<algorithm> using namespace std; long long diff(long long x, long long y, long long z) { return max(x, max(y, z)) - min(x, min(y, z)); } int main() { long long h, w; cin >> h >> w; long long ans(INT_MAX); for (int i = 1; i <= h / 2; ++i) { //for (int j = 1; j <= w / 2; ++j) { ...
a.cc: In function 'int main()': a.cc:10:17: error: 'INT_MAX' was not declared in this scope 10 | long long ans(INT_MAX); | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include<algorithm> +++ |+#include <...
s778559035
p03713
C++
#include<iostream> long long diff(long long x, long long y, long long z) { return max(x, max(y, z)) - min(x, min(y, z)); } int main() { long long h, w; cin >> h >> w; long long ans(INT_MAX); for (int i = 1; i <= h / 2; ++i) { //for (int j = 1; j <= w / 2; ++j) { long long j = w / 2; long long ...
a.cc: In function 'long long int diff(long long int, long long int, long long int)': a.cc:3:17: error: 'max' was not declared in this scope; did you mean 'std::max'? 3 | return max(x, max(y, z)) - min(x, min(y, z)); | ^~~ | std::max In file included from /usr/include/c+...
s461107398
p03713
C++
#include <bits/stdc++.h> #define rep(i, n) for(int i=0; i<(n); ++i) #define rep2(i, s, n) for(int i=s; i<(n); ++i) #define ALL(v) (v).begin(), (v).end() using namespace std; typedef long long ll; static const int INTINF = (2147483647); static const ll LLINF = (9223372036854775807); static const int MAX = 100001; sta...
a.cc: In function 'll calc(ll, ll)': a.cc:48:12: error: 'INF' was not declared in this scope 48 | ll res = INF; | ^~~
s744110189
p03713
C++
#include <bits/stdc++.h> #define rep(i, n) for(int i=0; i<(n); ++i) #define rep2(i, s, n) for(int i=s; i<(n); ++i) #define ALL(v) (v).begin(), (v).end() using namespace std; typedef long long ll; static const int INTINF = (2147483647); static const ll LLINF = (9223372036854775807); static const int MAX = 100001; sta...
a.cc: In function 'int main(int, const char**)': a.cc:76:20: error: redeclaration of 'll ma' 76 | ll ma = max(max(a, b), c); | ^~ a.cc:71:20: note: 'll ma' previously declared here 71 | ll ma = max(max(a, b), c); | ^~ a.cc:77:20: er...
s799248502
p03713
C++
#include<iostream> #include<vector> #include<algorithm> #include<map> #include<cstring> #include<math.h> #include<bitset> #include<queue> #include<set> #include<iomanip> #include<math.h> #include<assert.h> // #include<bits/stdc++.h> using namespace std; typedef long long ll; constexpr long long int INFLL = 100100100100...
a.cc: In function 'int main()': a.cc:32:16: error: 'M1' was not declared in this scope; did you mean 'M'? 32 | M[2] = h*W-M1; | ^~ | M a.cc:34:14: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_...
s590494565
p03713
C++
#include <bits/stdc++.h> using namespace std; typedef long long int ll; double PI = 3.14159265358979; int main(){ int H,W; cin >> H >> W; if(H % 3 == 0 || W % 3 == 0){ cout << 0 << endl; return 0; } int a = (W + W % 3) / 3; int A = H * a; int b = (H + H % 2) / 2; i...
a.cc: In function 'int main()': a.cc:45:4: error: 'ans' was not declared in this scope; did you mean 'abs'? 45 | ans = min(ans,T); | ^~~ | abs a.cc:50:4: error: 'ans' was not declared in this scope; did you mean 'abs'? 50 | ans = min(ans,S); | ^~~ | abs
s598097201
p03713
C++
#include <iostream>
/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
s707806998
p03713
C++
#include <iostream> #include <cstdio> using namespace std; typedef long long ll; ll h, w; ll a, b, c; ll mn = 4e18; ll abs(ll p){return p > 0 ? p : -p;} int main() { scanf("%lld%lld", &h, &w); for(ll i = 0; i <= h; i++) { a = w * i; b = (h - i) * (w / 2); c = w * h - a - b; ...
a.cc: In function 'int main()': a.cc:22:29: error: call of overloaded 'abs(ll)' is ambiguous 22 | mn = min(mn, max(abs(a - b), max(abs(b - c), abs(c - a)))); | ~~~^~~~~~~ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/ext/string_...
s343142318
p03713
C++
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <vector> #include <string> #include <algorithm> #include <iomanip> #include <cmath> using namespace std; #define DEBUG 0 #define REP(i, n) for (int i = 0; i < (n); i++) typedef long long ll; typedef pair<int,int> pint; static const ll MOD = 1000000007; stat...
a.cc: In function 'int main()': a.cc:27:15: warning: overflow in conversion from 'long long int' to 'int' changes value from '1000000000000000000' to '-1486618624' [-Woverflow] 27 | int res = INF; | ^~~ a.cc:44:22: error: no matching function for call to 'min(int&, ll)' 44 | re...
s988256392
p03713
C++
#include<bits/stdc++.h> typedef long long ll; using namespace std; ll H, W; ll calc(ll a, ll b, ll c){ ll mi = min(a, b); mi = min(mi, c); ll ma = max(a, b); ma = max(ma, c); return ma - mi; } ll divi(ll h, ll w){ ll ans = (ll)1e9; if(h >= 3){ ans = min(ans, (h%3?w:0)); } ll a = (w / 3) * h; ...
a.cc: In function 'll divi(ll, ll)': a.cc:26:6: error: redeclaration of 'll b' 26 | ll b = (w - (a / h)) * (h / 2); | ^ a.cc:21:6: note: 'll b' previously declared here 21 | ll b = (w - (a / h)) * (h / 2); | ^
s699545436
p03713
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll h,w;cin>>h>>w; ll ans=1e9; for (int i=0;i<2;i++) { for (int j=1;j<h;j++) { int hh=h-j; int hhh=hh/2; int hhhh=hh-hhh; ll mx=max(j,max(hhh,hhhh)); ll mn=min...
a.cc: In function 'int main()': a.cc:15:36: error: expected ')' before ';' token 15 | ans=min(ans,(mx*w-mn*w); | ~ ^ | )
s172191143
p03713
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll h,w;cin>>h>>w; int ans=1e9; for (int i=0;i<2;i++) { for (int j=1;j<h;j++) { int hh=h-j; int hhh=hh/2; int hhhh=hh-hhh; ll mx=max(j,max(hhh,hhhh)); ll mn=mi...
a.cc: In function 'int main()': a.cc:15:36: error: expected ')' before ';' token 15 | ans=min(ans,(mx*w-mn*w); | ~ ^ | ) a.cc:20:20: error: no matching function for call to 'min(int&, ll)' 20 | ans=min(ans,mx-m...
s549280671
p03713
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int h,w;cin>>h>>w; int ans=1e9; for (int i=0;i<2;i++) { for (int j=1;j<h;j++) { int hh=h-j; int hhh=hh/2; int hhhh=hh-hhh; ll mx=max(j,max(hhh,hhhh)); ll mn=m...
a.cc: In function 'int main()': a.cc:15:36: error: expected ')' before ';' token 15 | ans=min(ans,(mx*w-mn*w); | ~ ^ | ) a.cc:18:19: error: no matching function for call to 'max(int, const long long int&)' 18 | ...
s798654010
p03713
C++
#include<bits/stdc++.h> using namespace std; int main(){ int H,W; cin>>H >>W; if(H%3==0||W%3==0){ cout<<0<<endl; return 0; } int ans=INT_MAX; for(int i=1;i<H;i++){ int Sa=i*W, Sb=W/2*(H-i), Sc=(W-W/2)*(H-i); ans=min(ans, max({Sa, Sb, Sc})-min({Sa, Sb, Sc})); } for(int i=1;i<H-1;i++)...
a.cc: In function 'int main()': a.cc:18:45: error: expected ',' or ';' before ')' token 18 | int Sa=i*W, Sb=(H-i)/2*W, Sc=(H-(H-i)/2))*W; | ^ a.cc:28:45: error: expected ',' or ';' before ')' token 28 | int Sa=i*H, Sb=(W-i)/2*H, Sc=(W-(W-i)/2))*H; | ...