submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s824636234
p00025
C++
#include <iostream> #include <array> #include <algorithm> int main(){ int a1, a2, a3, a4, b1, b2, b3, b4; while(std::cin >> a1 >> a2 >> a3 >> a4){ std::cin >> b1 >>b2 >> b3 >>b4; std::array<int> A = {a1, a2, a3, a4}; std::array<int> B = {b1, b2, b3, b4}; int hit = 0; int blow = 0; for(int i = 0...
a.cc: In function 'int main()': a.cc:13:31: error: wrong number of template arguments (1, should be 2) 13 | std::array<int> A = {a1, a2, a3, a4}; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:...
s890966023
p00025
C++
#include <iostream> #include <array> #include <algorithm> int main(){ int a1, a2, a3, a4, b1, b2, b3, b4; while(std::cin >> a1 >> a2 >> a3 >> a4){ std::cin >> b1 >>b2 >> b3 >>b4; std::array<int, 4> A = {a1, a2, a3, a4}; std::array<int, 4> B = {b1, b2, b3, b4}; int hit = 0; int blow = 0; for(int...
a.cc: In function 'int main()': a.cc:24:25: error: 'count' was not declared in this scope; did you mean 'std::count'? 24 | count += std::count(A.begin(), A.end(), B[i]); | ^~~~~ | std::count In file included from /usr/include/c++/14/...
s680292549
p00025
C++
#include <iostream> #include <vector> #include <algorithm> int main(){ std::vector<int> a(4); while(std::cin >> a[0] >> a[1] >> a[2] >> a[3]){ int hit = 0, blow = 0; for(int i = 0; i < 4; ++i){ int b; std::cin >> b; auto it = st...
a.cc: In function 'int main()': a.cc:24:14: error: expected '}' at end of input 24 | return 0; | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s541577926
p00025
C++
import java.io.IOException; import java.util.Scanner; class Main { public static void main(String[] args) throws IOException { Scanner sc = null; try { sc = new Scanner(System.in); int countHit=0; int countBlow=0; while (sc.hasNext()) { String[] a = sc.nextLine().split(" "); String[...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.IOException; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodule...
s524617700
p00025
C++
#include <stdio.h> int main(void){ int a[4],b[4],n,t,r,i,c,d; for(r=0,r<2;r++){ c=0; d=0; for(t=0;t<4;t++){ scanf("%d",&a[t]); } for(t=0;t<4;t++){ scanf("%d",&b[t]); } for(t=0;t<4;t++){ for(i=0;i<4;i++){ if(b[t]==a[i]){ c++; } } } for(i=0;i<4;i++){ if(b[i]==a[i]){...
a.cc: In function 'int main()': a.cc:5:24: error: expected ';' before ')' token 5 | for(r=0,r<2;r++){ | ^ | ;
s537072480
p00025
C++
import Control.Monad import Control.Applicative import Data.List main = do xs <- input $ map read . words :: IO [[Int]] mapM_ putStrLn $ solve xs solve :: [[Int]] -> [String] solve [] = [] solve (xs:ys:yss) = (show h ++ " " ++ show b) : solve yss where h = hit xs ys b = smn xs ys - h hit :: [Int] -> ...
a.cc:16:28: error: stray '\' in program 16 | hit xs ys = sum $ zipWith (\x y -> if x == y then 1 else 0) xs ys | ^ a.cc:22:20: error: stray '`' in program 22 | f acc z = if z `elem` xs then acc + 1 else acc | ^ a.cc:22:25: error: stray '`' in program ...
s944926789
p00025
C++
#include<iostream> int main(){ int a[4],b[4],i,j,H,B; while(std::cin>>a[0]){ for(i=0;i<4;i++){ std::cin>>a[i]; } for(j=0;j<4;j++){ std::cin>>b[j]; } H=0; B=0; for(i=0;i<4;i++){ for(j=0;j<4;j++){ if(a[i]==b[j]){ if(i==j){ H++; } else(){ B++; } } } } ...
a.cc: In function 'int main()': a.cc:20:46: error: expected primary-expression before ')' token 20 | else(){ | ^
s343336085
p00025
C++
def hit_blow(arr1, arr2) n, m = 0, 0 4.times do |i| n += 1 if arr1[i] == arr2[i] m += 1 if arr1.include?(arr2[i]) end return [n, m - n] end while gets arr1, arr2 = $_.split, gets.split h, b = hit_blow(arr1, arr2) puts "#{h} #{b}" end
a.cc:1:1: error: 'def' does not name a type 1 | def hit_blow(arr1, arr2) | ^~~
s237948055
p00025
C++
while gets a=$<.split.map(&:to_i) b=gets.split.map(&:to_i) c,d=0,0; 4.times do |i| if a[i]==b[i] then c+=1 else 4.times do |j| if a[i]==b[j] then d+=1;break; end end end end print c," ",d,"\n" end
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while gets | ^~~~~ a.cc:5:9: error: expected unqualified-id before numeric constant 5 | 4.times do |i| | ^~~~~~~ a.cc:11:46: error: expected unqualified-id before 'break' 11 | d+=1;...
s498286209
p00025
C++
while gets a=$_.split.map(&:to_i) b=gets.split.map(&:to_i) c,d=0,0; 4.times{|i| if a[i]==b[i] then c+=1 else d+=1 if b.find{|j|j==a[i]} end } print c," ",d,"\n" end
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while gets | ^~~~~ a.cc:5:1: error: expected unqualified-id before numeric constant 5 | 4.times{|i| | ^~~~~~~ a.cc:12:1: error: 'print' does not name a type; did you mean 'int'? 12 | print c," ",d,"\n" | ^~~~~ | int
s247143365
p00025
C++
#include<iostream> using namespace std; int main(){ int a[4],c[4]; while(1){ int e=0,b=0,k; for(int i=0;i<4;i++) k=cin >> a[i]; if(!k)break; if(a[i]==-1)break; for(int i=0;i<4;i++){ cin >> c[i]; for(int j=0;j<4;j++) if(c[i]==a[j]){ if(i==j)e++; else b++; } } co...
a.cc: In function 'int main()': a.cc:9:13: error: cannot convert 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' in assignment 9 | k=cin >> a[i]; | ~~~~^~~~~~~ | | | std::basic_istream<char>::__istream_type {aka std::basic_...
s347907943
p00025
C++
#include<iostream> using namespace std; int main(){ int a[4],c[4]; while(1){ int e=0,b=0,k; for(int i=0;i<4;i++) k=cin >> a[i]; if(!k)break; for(int i=0;i<4;i++){ cin >> c[i]; for(int j=0;j<4;j++) if(c[i]==a[j]){ if(i==j)e++; else b++; } } cout<<e<<' '<<b<<endl; ...
a.cc: In function 'int main()': a.cc:9:13: error: cannot convert 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' in assignment 9 | k=cin >> a[i]; | ~~~~^~~~~~~ | | | std::basic_istream<char>::__istream_type {aka std::basic_...
s434261460
p00025
C++
#include <iostream> using namespace std; int main() { int a[4], b[4]; int blow, hit; while(cin >> a[0] == EOF){ cin >> a[1] >> a[2] >> a[3]; cin >> b[0] >> b[1] >> b[2] >> b[3]; hit = blow = 0; for(int i = 0; i < 4; i++){ if(a[i] == b[i]){ hit += 1; } } for(int i ...
a.cc: In function 'int main()': a.cc:11:21: error: no match for 'operator==' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 11 | while(cin >> a[0] == EOF){ | ~~~~~~~~~~~ ^~ | | | std::basic_istream<char>::_...
s099776216
p00025
C++
#include <iostream> using namespace std; int main(){ int a[4]; int b[4]; int h=0; int b=0; int m, n; for(int i=0; i<4; i++){ cin >> a[i]; } for(int i=0; i<4; i++){ cin >> b[i]; } for(m=0; m<4; m++){ for(n=0; n<4; n++){ if(a[m] == b[n] && m == n){ h = h+1; } else if(a[m] == b[n]){ b =...
a.cc: In function 'int main()': a.cc:9:13: error: conflicting declaration 'int b' 9 | int b=0; | ^ a.cc:7:13: note: previous declaration as 'int b [4]' 7 | int b[4]; | ^ a.cc:24:35: error: incompatible types in assignment of 'int*' to 'int [4]' 24 | ...
s670951055
p00025
C++
#include <iostream> #include <iostream> using namespace std; int main(){ int a[4]; int b[4]; int hit=0; int blow=0; int m, n; for(int i=0; i<4; i++){ cin >> a[i]; } for(int i=0; i<4; i++){ cin >> b[i]; } for(m=0; m<4; m++){ for(n=0; n<4; n++){ if(a[m] == b[n] && m == n){ hit = hit + 1; } ...
a.cc: In function 'int main()': a.cc:30:2: error: expected '}' at end of input 30 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s467699325
p00025
C++
#include<vector> #include<iostream> using namespace std; int main() { int code[4], line, hit, bro; while (true) { hit = 0; bro = 0; for (int i = 0; i < 4; ++i) { cin >> code[i]; }#include<vector> #include<iostream> using namespace std; int main() { int code[4], line, hit, bro; while (cin>>code[0]) { hi...
a.cc:11:18: error: stray '#' in program 11 | }#include<vector> | ^ a.cc: In function 'int main()': a.cc:11:19: error: 'include' was not declared in this scope 11 | }#include<vector> | ^~~~~~~ a.cc:11:33: error: missing template argumen...
s795250373
p00025
C++
#include <iostream> #include <vector> #include <cmath> #include <iomanip> #include <string> #include <queue> #include <algorithm> #include <cctype> #define shosu(x) fixed<<setprecision(x) using namespace std; typedef long long ll; typedef pair<int,int> P; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<P...
a.cc: In function 'int main()': a.cc:26:32: error: 'g' was not declared in this scope 26 | while(cin>>c>>d>>e>>f>>g>>h>>d>>k){ | ^ a.cc:26:35: error: 'h' was not declared in this scope 26 | while(cin>>c>>d>>e>>f>>g>>h>>d>>k){ | ...
s593231681
p00025
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication26 { class Program { static void Main(string[] args) { string s,t; while((s=Console.ReadLine())!=null) { t=Console.ReadLine(); int[] a = s.Split().Select(int.Parse...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s784711763
p00025
C++
int main() { int hit[4]={},blow[4]={}; while(cin>>hit[0]){ int ans1=0,ans2=0; for(int i=1; i<4; i++){ cin>>hit[i]; } for(int i=0; i<4; i++){ cin>>blow[i]; } for(int i=0; i<4; i++){ for(int j=0; j<4; j++){ if(hit[...
a.cc: In function 'int main()': a.cc:4:11: error: 'cin' was not declared in this scope 4 | while(cin>>hit[0]){ | ^~~ a.cc:19:9: error: 'cout' was not declared in this scope 19 | cout<<ans1<<" "<<ans2<<endl; | ^~~~ a.cc:19:32: error: 'endl' was not declared in this scope ...
s031719577
p00025
C++
#include<iostream> int main() { int hit[4]={},blow[4]={}; while(cin>>hit[0]){ int ans1=0,ans2=0; for(int i=1; i<4; i++){ cin>>hit[i]; } for(int i=0; i<4; i++){ cin>>blow[i]; } for(int i=0; i<4; i++){ for(int j=0; j<4; j++){ ...
a.cc: In function 'int main()': a.cc:5:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | while(cin>>hit[0]){ | ^~~ | 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;...
s032318195
p00025
C++
#include<iostream> using namespace std; int main(){ int a[4],b[4],n,m; while(cin >> a[0]){ n = 0; m = 0; cin >> a[1] >> a[2] >> a[3]; for(int i=0;i<4;i++){ cin >> b[i]; if(a[i] == b[i]) n++; } sort(a,a+4); for(int i=0;i<4;i++){ if(*lower_bound(a,a+4,b[i])==b[i]) m++; ...
a.cc: In function 'int main()': a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(a,a+4); | ^~~~ | short
s549832409
p00025
C++
#include <iostream> #include <array> int main(){ std::array<int,4> num_a, num; std::cin >> num_a[0] >> num_a[1] >> num_a[2] >> num_a[3]; while(std::cin >> num[0] >> num[1] >> num[2] >> num[3]){ int hit = 0, blow = 0; for(size_t i = 0; i < 4; ++i){ if(num_a[i] == num[i]){ ++hit; }else{ for(size_...
a.cc: In function 'int main()': a.cc:23:22: error: 'out' is not a member of 'std'; did you mean 'oct'? 23 | std::out << hit << " " << blow << std::endl; | ^~~ | oct
s430656995
p00025
C++
#include<iostream> #include<vector> using namespace std; void get(int* nums_a,int* nums_b){ int nums_a[4]; int nums_b[4]; for(int i=0;i<4;i++){ cin>>nums_a[i]; } for(int i=0;i<4;i++){ cin>>nums_b[i]; } } int main(){ vector<int> hit_anss; vector<int> bolor_anss; int hit=0,bolor=0; while(get...
a.cc: In function 'void get(int*, int*)': a.cc:6:7: error: declaration of 'int nums_a [4]' shadows a parameter 6 | int nums_a[4]; | ^~~~~~ a.cc:5:15: note: 'int* nums_a' previously declared here 5 | void get(int* nums_a,int* nums_b){ | ~~~~~^~~~~~ a.cc:7:7: error: declaration of 'in...
s301347035
p00025
C++
#include<iostream> #include<vector> using namespace std; int main(){ vector<int> hit_anss; vector<int> bolor_anss; int nums_a[4],nums_b[4]; int hit=0,bolor=0; while(cin>>nums_a[0]<<nums_a[1]<<nums_a[2]<<nums_a[3]<<nums_a[3]){ for(int i=0;i<4;i++){ cin>>nums_b[i]; } //hit????¢???? for(int...
a.cc: In function 'int main()': a.cc:9:23: error: no match for 'operator<<' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 9 | while(cin>>nums_a[0]<<nums_a[1]<<nums_a[2]<<nums_a[3]<<nums_a[3]){ | ~~~~~~~~~~~~~~^~~~~~~~~~~ | ...
s145768558
p00025
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,e,f,g,h,x=0,y=0; while(cin >> a >> b >> c >> d >> e >> f >> g >> h){ x=0; y=0; if (a==e){x=x+1} if (b==f){x=x+1} if (c==g){x=x+1} if (d==h){x=x+1} if (e==a || e==b || e==c || e==d){y=y+1;} ...
a.cc: In function 'int main()': a.cc:8:24: error: expected ';' before '}' token 8 | if (a==e){x=x+1} | ^ | ; a.cc:9:24: error: expected ';' before '}' token 9 | if (b==f){x=x+1} | ^ | ...
s745703759
p00025
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,e,f,g,h,x=0,y=0; while(cin >> a >> b >> c >> d >> e >> f >> g >> h){ x=0; y=0; if (a==e){x=x+1;e=e+10} if (b==f){x=x+1;f=f+10} if (c==g){x=x+1;g=g+10} if (d==h){x=x+1;h=h+10} if (e==a || e==...
a.cc: In function 'int main()': a.cc:8:31: error: expected ';' before '}' token 8 | if (a==e){x=x+1;e=e+10} | ^ | ; a.cc:9:31: error: expected ';' before '}' token 9 | if (b==f){x=x+1;f=f+10} | ...
s854526627
p00025
C++
#include <iostream> int main(){ std::array(u_int, 4) a, b; int hit=0, blow=0; while(cin >> a[0] >> a[1] >> a[2] >> a[3]){ cin >> b[0] >> b[1] >> b[2] >> b[3]; for(int i=0;i<4;i++){ if(a[i]==b[i]) hit++; for(int j=0;j<4;j++){ if(a[i]==b[j]) blow++; } } cout << hit << blow-hit << std::endl; } ...
a.cc: In function 'int main()': a.cc:4:19: error: missing template arguments before '(' token 4 | std::array(u_int, 4) a, b; | ^ a.cc:4:25: error: expected primary-expression before ',' token 4 | std::array(u_int, 4) a, b; | ^ a.cc:7:15: erro...
s346025186
p00025
C++
#include <iostream> #include <array> int main(){ std::array(u_int, 4) a, b; int hit=0, blow=0; while(cin >> a[0] >> a[1] >> a[2] >> a[3]){ cin >> b[0] >> b[1] >> b[2] >> b[3]; for(int i=0;i<4;i++){ if(a[i]==b[i]) hit++; for(int j=0;j<4;j++){ if(a[i]==b[j]) blow++; } } cout << hit << blow-hit <...
a.cc: In function 'int main()': a.cc:5:19: error: missing template arguments before '(' token 5 | std::array(u_int, 4) a, b; | ^ a.cc:5:25: error: expected primary-expression before ',' token 5 | std::array(u_int, 4) a, b; | ^ a.cc:8:15: erro...
s101952171
p00025
C++
#include <iostream> #include <array> int main(){ std::array(u_int, 4) a, b; int hit=0, blow=0; while(cin >> a[0] >> a[1] >> a[2] >> a[3]){ cin >> b[0] >> b[1] >> b[2] >> b[3]; for(int i=0;i<4;i++){ if(a[i]==b[i]) hit++; for(int j=0;j<4;j++){ if(a[i]==b[j]) blow++; } } cout << hit << blow-hit <...
a.cc: In function 'int main()': a.cc:5:19: error: missing template arguments before '(' token 5 | std::array(u_int, 4) a, b; | ^ a.cc:5:25: error: expected primary-expression before ',' token 5 | std::array(u_int, 4) a, b; | ^ a.cc:8:15: erro...
s504368494
p00025
C++
#include <iostream> #include <array> int main(){ std::array(u_int, 4) a; std::array(u_int, 4) b; int hit=0, blow=0; while(cin >> a[0] >> a[1] >> a[2] >> a[3]){ cin >> b[0] >> b[1] >> b[2] >> b[3]; for(int i=0;i<4;i++){ if(a[i]==b[i]) hit++; for(int j=0;j<4;j++){ if(a[i]==b[j]) blow++; } } cou...
a.cc: In function 'int main()': a.cc:5:19: error: missing template arguments before '(' token 5 | std::array(u_int, 4) a; | ^ a.cc:5:25: error: expected primary-expression before ',' token 5 | std::array(u_int, 4) a; | ^ a.cc:6:19: error: mis...
s358734691
p00025
C++
#include <iostream> #include <array> int main(){ std::array(u_int, 4) a,b; int hit=0, blow=0; while(std::cin >> a[0] >> a[1] >> a[2] >> a[3]){ std::cin >> b[0] >> b[1] >> b[2] >> b[3]; for(int i=0;i<4;i++){ if(a[i]==b[i]) hit++; for(int j=0;j<4;j++){ if(a[i]==b[j]) blow++; } } std::cout << hit...
a.cc: In function 'int main()': a.cc:5:19: error: missing template arguments before '(' token 5 | std::array(u_int, 4) a,b; | ^ a.cc:5:25: error: expected primary-expression before ',' token 5 | std::array(u_int, 4) a,b; | ^ a.cc:8:27: error:...
s915586267
p00025
C++
#include <iostream> using namespace std; int main() { int a[4], b, hit, blow, i, j; while (cin >> a[0]) { h = 0, blow = 0; for (i = 1; i < 4; i++) { cin >> a[i]; } for (i = 0; i < 4; i++) { cin >> b; for (j = 0; j < 4; j++) { if (a[j] == b) { if (i == j) { hit++; } ...
a.cc: In function 'int main()': a.cc:8:5: error: 'h' was not declared in this scope 8 | h = 0, blow = 0; | ^
s039608568
p00025
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int a[4],b[4],h,bb,i; while(cin>>a[0]>>a[1]>>a[2]>>a[3]>>b[0]>>b[1]>>b[2]>>b[3]){ h=bb=0 for(i=0;i<4;i++)if(a[i]==b[i])h++; sort(a,a+4);sort(b,b+4); for(i=0;i<4;i++)if(find(b,b+4,a[i])!=b+4)bb++; bb -= h; cout<<h<<" "<< bb << endl; ...
a.cc: In function 'int main()': a.cc:7:9: error: expected ';' before 'for' 7 | h=bb=0 | ^ | ; 8 | for(i=0;i<4;i++)if(a[i]==b[i])h++; | ~~~ a.cc:8:18: error: expected ';' before ')' token 8 | for(i=0;i<4;i++)if(a[i]==b[i])h++; | ^ | ...
s480975070
p00025
C++
#include<iostream> #include<vector> using namespace std; int main(){ vector<int> a(4); while(cin>>a[0]>>a[1]>>a[2]>>a[3]){ vector<int> b(4); cin>>b[0]>>b[1]>>b[2]>>b[3]; int h=0,bl=0; for(int i=0;i<4;++i){ if(b[i]==a[i]) ++h; else if(find(a.begin(),a.end(),b[i])!=a.end()) ++bl; } cout << h << " " <<...
a.cc: In function 'int main()': a.cc:12:37: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)' 12 | else if(find(a.begin(),a.end(),b[i])!=a.end()) ++bl; | ...
s908642633
p00025
C++
#include <iostream> using namespace std; int main(){ int a[4]; int b[4]; while(1){ int hit = 0; int blow = 0; cin >> a[0] >> a[1] >> a[2] >> a[3]; cin >> b[0] >> b[1] >> b[2] >> b[3]; for(int i=0; i<4; i++){ for(int j=0; j<4; j++){ if(a...
a.cc: In function 'int main()': a.cc:25:23: error: 'hit' was not declared in this scope 25 | printf("%d %d\n", hit, blow); | ^~~ a.cc:25:28: error: 'blow' was not declared in this scope 25 | printf("%d %d\n", hit, blow); | ^~~~
s240733420
p00025
C++
#include <iostream> #include <vector> using namespace std; int main() { vector<int> a(4), b(4); while (cin >> a[0]) { for (int i = 1; i < 4; i++) cin >> a[i]; for (int i = 0; i < 4; i++) cin >> b[i]; int hit = 0, blow = 0; for (int i = 0; i < 4; i++) { if (find(b.begin(), b.end(), a[i]) != b....
a.cc: In function 'int main()': a.cc:12:15: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)' 12 | if (find(b.begin(), b.end(), a[i]) != b.end()) { | ~~~~^~~~~~~~~~~~~~~~~~~~~~...
s636481557
p00025
C++
#include <stdio.h> int main(){ int a[5],b[5],i,j; int hit=0,blow=0; while(scanf("%d %d %d %d %d %d %d %d",&a[1],&a[2],&a[3],&a[4],&b[1],&b[2],&b[3],&b[4]) != EOF){ for(i=1;i<=4;i++){ if(a[i]==b[i]){ hit++; } } for(i=1;i<=4;i++){ for(j=1;j<= 4;j++){ if(j != i){ if...
a.cc: In function 'int main()': a.cc:23:4: error: expected '}' at end of input 23 | } | ^ a.cc:2:13: note: to match this '{' 2 | int main(){ | ^
s125435483
p00025
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int a[4]; int b[4]; while(cin>>a[0]>>a[1]>>a[2]>>a[3]) { for(int i=0; i<4; i++) cin>>b[i]; int hit=0; int blow=0; for(int i=0;i<4;i++) { if(a[i]==b[i]) hit++; else { for(int j=0...
a.cc: In function 'int main()': a.cc:30:10: error: 'hit' was not declared in this scope 30 | cout<<hit<<" "<<blow<<endl; | ^~~ a.cc:30:20: error: 'blow' was not declared in this scope 30 | cout<<hit<<" "<<blow<<endl; | ^~~~
s981386373
p00025
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int a[4]; int b[4]; while(cin>>a[0]>>a[1]>>a[2]>>a[3]) { for(int i=0; i<4; i++) { cin>>b[i]; int hit=0; int blow=0; for(int i=0;i<4;i++) { if(a[i]==b[i]) hit++; else { for(in...
a.cc: In function 'int main()': a.cc:31:10: error: 'hit' was not declared in this scope 31 | cout<<hit<<" "<<blow<<endl; | ^~~ a.cc:31:20: error: 'blow' was not declared in this scope 31 | cout<<hit<<" "<<blow<<endl; | ^~~~
s273925342
p00025
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int a[4]; int b[4]; while(cin>>a[0]>>a[1]>>a[2]>>a[3]) { for(int i=0; i<4; i++) cin>>b[i]; int hit=0; int blow=0; for(int i=0;i<4;i++) { if(a[i]==b[i]) { hit++; else { ...
a.cc: In function 'int main()': a.cc:22:6: error: expected '}' before 'else' 22 | else | ^~~~ a.cc:20:6: note: to match this '{' 20 | { | ^ a.cc:32:10: error: 'hit' was not declared in this scope 32 | cout<<hit<<" "<<blow<<endl; | ^~~ a.cc:32:20: error: 'blow' ...
s534818556
p00025
C++
a[4],b[4];main(){int i,j,h,l;for(;~scanf("%d%d%d%d%d%d%d%d",a,a+1,a+2,a+3,b,b+1,b+2,b+3);printf("%d %d\n",h,l))for(i=h=l=0;i<4;i++)for(j=0;j<4;j++)if(a[i]==b[j])i==j?h++:l++;exit(0);}
a.cc:1:1: error: 'a' does not name a type 1 | a[4],b[4];main(){int i,j,h,l;for(;~scanf("%d%d%d%d%d%d%d%d",a,a+1,a+2,a+3,b,b+1,b+2,b+3);printf("%d %d\n",h,l))for(i=h=l=0;i<4;i++)for(j=0;j<4;j++)if(a[i]==b[j])i==j?h++:l++;exit(0);} | ^ a.cc:1:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wre...
s158018815
p00025
C++
#include<iostream> #include<string> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int main(void){ while(cin<<n){ int a,b,c,d; cin>>a>>b>>c>>d; int w,x,y,z; int hit=0,blow=0; cin>>w>>x>>y>>z; if(w==a)hit++; else if(w==b||w==c||w==d)blow++; if(x==b)hit++; else if(x==a||x==c||x=...
a.cc: In function 'int main()': a.cc:8:16: error: 'n' was not declared in this scope 8 | while(cin<<n){ | ^
s645791886
p00025
C++
#include <iostream> using namespace std; int main() { int i,j; int a[4]; int b[4]; while(1){ int hit = 0; int blow = 0; if(cin.eof())return; for(i=0;i<4;++i)cin>>a[i]; for(i=0;i<4;++i)cin>>b[i]; for(i=0;i<4;++i){ for(j=0;j<4;++j){ if(b[i] == a[j]){ (j == i) ? ++hit : ++blow; } } ...
a.cc: In function 'int main()': a.cc:13:30: error: return-statement with no value, in function returning 'int' [-fpermissive] 13 | if(cin.eof())return; | ^~~~~~
s501710803
p00025
C++
include <iostream> using namespace std; int main() { int a[4], b[4]; while(cin >> a[0] >> a[1] >> a[2] >> a[3]) { cin >> b[0] >> b[1] >> b[2] >> b[3]; int hit=0, blow=0; bool checked[4][4]; for(int i=0;i<4;i++)for(int j=0;j<4;j++)checked[i][j]=false; for(int i = 0; i < 4; i++) { for(in...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope 8 | while(cin >> a[0] >> a[1] >> a[2] >> a[3]) { | ^~~ a.cc:28:5: error: 'cout' was not declared in this scope 28 | ...
s798861843
p00025
C++
#include <iostream> using namespace std; int main(){ int a[4], b[4]; while(cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]){ int hit = 0, blow = 0; for(int i = 0; i < 4; i++){ for(int j = 0; j < 4; j++){ if(a[i] == b[j]){ if(i == ...
a.cc:6:46: error: extended character   is not valid in an identifier 6 | while(cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]){ | ^ a.cc: In function 'int main()': a.cc:6:46: error: expected ')' before '\U00003000' 6 | while(cin >> ...
s352908363
p00025
C++
#include <iostream> #include <math.h> using namespace std; int main() { double num, t; int a[4],b[4]; int hit, brow; while ( cin >> a[0] >> a[1] >> a[2] >> a[3] ) { cin >> b[0] >> b[1] >> b[2] >> b[3]; hit = 0; brow = 0; for( int i = 0; i < 4; i++ ) { for( int j = 0; j < 4; j++ ) { if( b[...
a.cc: In function 'int main()': a.cc:27:40: error: expected primary-expression before '<<' token 27 | cout << hit << << " " << brow << endl; | ^~
s604311054
p00025
C++
#include <iostream> #include <iomanip> #include <cassert> #include <algorithm> #include <functional> #include <vector> #include <string> #include <cstring> #include <stack> #include <queue> #include <map> #include <bitset> #include <sstream> #include <istream> #include <cmath> #include <cstdio> using namespace std; #...
a.cc: In function 'int main()': a.cc:50:105: error: expected ')' before '{' token 50 | while (~scanf("%d %d %d %d %d %d %d %d", &a[0], &a[1], &a[2], &a[3], &b[0], &b[1], &b[2], &b[3]) { | ~ ^~ | ...
s443465546
p00025
C++
#include <iostream> #include <vector> int get_hit(std::vector<u_int> *A, std::vector<u_int> *B) { u_int hit = 0; for(u_int i = 0; i < A -> size(); ++i) if(A -> at(i) == B -> at(i)) ++hit; return hit; } int get_blow(std::vector<u_int> *A, std::vector<u_int> *B) { u_i...
a.cc: In function 'int main()': a.cc:38:31: error: aggregate 'std::array<unsigned int, 4> array' has incomplete type and cannot be defined 38 | std::array<u_int, number> array; | ^~~~~ a.cc:3:1: note: 'std::array' is defined in header '<array>'; this is probably fixable by add...
s018712338
p00026
Java
import java.util.Scanner; public class DroppingInc { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); scanner.useDelimiter(",|\\n"); int x,y,plotSize; int paper[][] = new int[14][14]; int zeroCellNum = 0; int mostDark = 0; while(scanner.hasNext()){ x = 2 + scanner.n...
Main.java:2: error: class DroppingInc is public, should be declared in a file named DroppingInc.java public class DroppingInc { ^ 1 error
s647689942
p00026
Java
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Scanner; public class AOJ0026DroppingInk { public static void main(String[] args) { exec(); } private static void exec() { Scanner sc = new Scanner(System.in); Lis...
Main.java:7: error: class AOJ0026DroppingInk is public, should be declared in a file named AOJ0026DroppingInk.java public class AOJ0026DroppingInk { ^ 1 error
s519605433
p00026
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class V00026 { private static BufferedReader br; private static int[][] squares; static { br = new BufferedReader(new InputStreamReader(System.in)); squares = new int[10][10];...
Main.java:7: error: class V00026 is public, should be declared in a file named V00026.java public class V00026 { ^ 1 error
s239782397
p00026
Java
int field[][] = setField(); System.out.println("入力してください"); Scanner input = new Scanner(System.in); while (input.hasNext()) { String[] inputString = input.next().split(","); drop(field, Integer.parseInt(inputString[0]), Integer.parseInt(inputString[1]), Integer.parseInt(inputString[2]) ); } am...
Main.java:1: error: class, interface, enum, or record expected int field[][] = setField(); ^ Main.java:2: error: class, interface, enum, or record expected System.out.println("????????"); ^ Main.java:3: error: unnamed classes are a preview feature and are disabled by default. Scanner input = new Scanner(System.in...
s459781968
p00026
Java
int field[][] = setField(); System.out.println("入力してください"); Scanner input = new Scanner(System.in); while (input.hasNext()) { String[] inputString = input.next().split(","); drop(field, Integer.parseInt(inputString[0]), Integer.parseInt(inputString[1]), Integer.parseInt(inputString[2]) ); } am...
Main.java:1: error: class, interface, enum, or record expected int field[][] = setField(); ^ Main.java:2: error: class, interface, enum, or record expected System.out.println("????????"); ^ Main.java:3: error: unnamed classes are a preview feature and are disabled by default. Scanner input = new Scanner(System.in...
s403331744
p00026
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Question2 { public static void main(String[] args) { int field[][] = setField(); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String input = null; while (true) { try { ...
Main.java:5: error: class Question2 is public, should be declared in a file named Question2.java public class Question2 { ^ 1 error
s188905032
p00026
Java
package volume0; import java.io.IOException; import java.util.Scanner; public class MAIN { // 10*10????????????????????????????????´???????????????14*14????????????????????? private static int[][] square = new int[14][14]; private static int SMALL_INK = 1; private static int LARGE_INK = 3; private static int AL...
Main.java:6: error: class MAIN is public, should be declared in a file named MAIN.java public class MAIN { ^ 1 error
s817022780
p00026
Java
import java.awt.Point; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashSet; public class Main1 { public static void main(String[] args) { int x = 0; int y = 0; int scale = 0; //?´?[10??10] int[][] math = new int[10][10]; HashSet<Point> sco...
Main.java:7: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s624616577
p00026
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main4 { static int[][] math; static final int MATH_LENGTH = 10; public static void main(String[] args) throws IOException { //変数の初期化 math = new int[10][10]; int x = 0, y = 0; int scale = 0; //入力値を...
Main.java:7: error: class Main4 is public, should be declared in a file named Main4.java public class Main4 { ^ 1 error
s518525740
p00026
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static int[][] math; static final int MATH_LENGTH = 10; public static void main(String[] args) throws IOException { //紙 math = new int[10][10]; int scale; Buf...
Main.java:27: error: ')' or ',' expected setSmallInk(Integer.valueOf(inputSplitStr[0]), Integer.valueOf(inputSplitStr[1]); ^ Main.java:30: error: ')' or ',' expected setMediumInk(Integer.value...
s309319964
p00026
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static int[][] math; static final int MATH_LENGTH = 10; public static void main(String[] args) throws IOException { //紙 math = new int[10][10]; int scale; Buf...
Main.java:26: error: ')' or ',' expected setSmallInk(Integer.valueOf(inputSplitStr[0]), Integer.valueOf(inputSplitStr[1]); ^ Main.java:29: error: ')' or ',' expected setMediumInk(Integer.value...
s291756457
p00026
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static int[][] math; static final int MATH_LENGTH = 10; public static void main(String[] args) throws IOException { //紙 math = new int[10][10]; int scale; Buf...
Main.java:24: error: cannot find symbol switch (nteger.valueOf(inputSplitStr[2])) { ^ symbol: variable nteger location: class Main 1 error
s232194352
p00026
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static int[][] math; static final int MATH_LENGTH = 10; public static void main(String[] args) throws IOException { math = new int[10][10]; int scale; BufferedReader br = new...
Main.java:21: error: cannot find symbol switch (nteger.valueOf(inputSplitStr[2])) { ^ symbol: variable nteger location: class Main 1 error
s324280719
p00026
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static int[][] math; static final int MATH_LENGTH = 10; public static void main(String[] args) throws IOException { math = new int[10][10]; int scale; BufferedReader br = new BufferedReader(new InputStr...
Main.java:19: error: cannot find symbol string[] inputSplitStr = inputStr.split(","); ^ symbol: class string location: class Main 1 error
s873487712
p00026
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int[][] di=new int[10][10]; int max,count=0; String str; while((str=readLine())!=null){ String[] s=str.split(","); int x=Integer.parseInt(s[0]); int y=Integer...
Main.java:9: error: cannot find symbol while((str=readLine())!=null){ ^ symbol: method readLine() location: class Main Main.java:13: error: variable s is already defined in method main(String[]) int s=Integer.parseInt(s[2]); ^ Main.java:13: error: array required, but int found int s=Integer.parseIn...
s871491151
p00026
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int[][] di=new int[10][10]; int max,count=0; String str; while((str=br.readLine())!=null){ String[] s=str.split(","); int x=Integer.parseInt(s[0]); int y=Inte...
Main.java:13: error: variable s is already defined in method main(String[]) int s=Integer.parseInt(s[2]); ^ Main.java:13: error: array required, but int found int s=Integer.parseInt(s[2]); ^ 2 errors
s502371820
p00026
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int[][] di=new int[10][10]; int max,count=0; String str; while((str=br.readLine())!=null){ String[] value=str.split(","); int x=Integer.parseInt(value[0]); in...
Main.java:18: error: variable max might not have been initialized max=Math.max(max,di[i][j]); ^ Main.java:25: error: variable max might not have been initialized System.out.println(max); ^ 2 errors
s642841650
p00026
Java
import java.lang.*; import java.util.*; import java.io.*; public class check { static int array[][]= new int[10][10]; public static void main (String[] arg)throws IOException { BufferedReader input =new BufferedReader (new InputStreamReader (System.in)); String line; StringTokenizer tokenizer1,tokenizer2; i...
Main.java:5: error: class check is public, should be declared in a file named check.java public class check ^ 1 error
s721106419
p00026
Java
public class Main { static int paper[][] = new int[10][10]; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = null; while ((str = br.readLine()) != null) { // ??\??????????????? String[] input = str.split...
Main.java:5: error: cannot find symbol public static void main(String[] args) throws IOException { ^ symbol: class IOException location: class Main Main.java:7: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^...
s087068095
p00026
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ while(scan.hasNext()){ int count = 0; int max = 0; int[][] paper = new int[10][10]; for(int i = 0; i < 10; i++){ for(int j = 0; j < 10; j++){ paper[i][...
Main.java:54: error: cannot find symbol if(paper[i][j] == 0){ ^ symbol: variable paper location: class Main Main.java:55: error: cannot find symbol count++; ^ symbol: variable count location: class Main Main.java:57: error: cannot find symbol if(max < paper[i][j]){ ^ symbol...
s741175601
p00026
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in) .useDelimiter("[ ,\n]"); public static void main(String[] args){ int[][] paper = new int[10][10]; int count = 0; int max = 0; for(int i = 0; i < 10; i++){ for(int j = 0; j < 10; j++){ paper[i][j] ...
Main.java:131: error: cannot find symbol papaer[x][y] += 1; ^ symbol: variable papaer location: class Main 1 error
s880816999
p00026
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ int n = 10; int[][] map = new int[n][n]; int[][] small = {{0, 1, 0}, {1, 1, 1}, {0, 1, 0}}; int[][] middle = {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}; int[][] large = {{0, 0,...
Main.java:51: error: cannot find symbol if(xx < 0 || xx >= n|| yy < 0 || yy >= n){ ^ symbol: variable n location: class Main Main.java:51: error: cannot find symbol if(xx < 0 || xx >= n|| yy < 0 || yy >= n){ ^ symbol: variable n location: cla...
s473495132
p00026
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); int n = 10; int[][] map = new int[n][n]; public static void main(String[] args){ int[][] small = {{0, 1, 0}, {1, 1, 1}, {0, 1, 0}}; int[][] middle = {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}; int[][] large = {{0, 0, ...
Main.java:37: error: non-static variable n cannot be referenced from a static context for(int i = 0; i < n; i++){ ^ Main.java:38: error: non-static variable n cannot be referenced from a static context for(int j = 0; j < n; j++){ ^ Main.java:39: error: non-static vari...
s938704755
p00026
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); static int n = 10; static int[][] map = new int[n][n]; public static void main(String[] args){ int[][] small = {{0, 1, 0}, {1, 1, 1}, {0, 1, 0}}; int[][] middle = {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}; int[][] la...
Main.java:55: error: cannot find symbol map[x][y]++; ^ symbol: variable x location: class Main Main.java:55: error: cannot find symbol map[x][y]++; ^ symbol: variable y location: class Main 2 errors
s560864958
p00026
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); static int n = 10; static int[][] map = new int[n][n]; public static void main(String[] args){ int[][] small = {{0, 1, 0}, {1, 1, 1}, {0, 1, 0}}; int[][] middle = {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}; int[][] la...
Main.java:27: error: variable d might not have been initialized int m = d.length / 2; ^ 1 error
s172669180
p00026
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); static int n = 10; static int[][] map = new int[n][n]; public static void main(String[] args){ int[][] small = {{0, 1, 0}, {1, 1, 1}, {0, 1, 0}}; int[][] middle = {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}; int[][] la...
Main.java:27: error: variable d might not have been initialized int m =(int)(d.length / 2); ^ 1 error
s798551415
p00026
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); static int n = 10; static int[][] map = new int[n][n]; public static void main(String[] args){ int[][] small = {{0, 1, 0}, {1, 1, 1}, {0, 1, 0}}; int[][] middle = {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}; int[][] la...
Main.java:28: error: variable m is already defined in method main(String[]) int m =(int)(d.length / 2); ^ 1 error
s517383250
p00026
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); static int n = 10; static int[][] map = new int[n][n]; public static void main(String[] args){ int[][] small = {{0, 1, 0}, {1, 1, 1}, {0, 1, 0}}; int[][] middle = {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}; int[][] la...
Main.java:28: error: variable d might not have been initialized m =(int)(d.length / 2); ^ 1 error
s075169941
p00026
Java
import java.util.Arrays; import java.util.Scanner; public class Main1 { static Scanner sc = new Scanner(System.in); private static final int MASS = 10; private static final int[] dx = {0, 0,-1, 1,-1,-1, 1, 1, 0, 0,-2, 2}; private static final int[] dy = {-1, 1, 0, 0,-1, 1,-1, 1,-2, 2, 0, 0}; public static void m...
Main.java:4: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s525646518
p00026
Java
import java.util.*; import java.io.*; import static java.util.Arrays.*; import static javaa.String.Math.*; public Main { int INF = 1 << 28; double EPS = 1e-10; int OFS = 2; int[][] map; void run() { Scanner sc = new Scanner(System.in); map = new int[10 + 4][10 + 4]; for(;sc.hasNext(); ) { String[] s...
Main.java:7: error: class, interface, enum, or record expected public Main { ^ Main.java:9: error: unnamed classes are a preview feature and are disabled by default. double EPS = 1e-10; ^ (use --enable-preview to enable unnamed classes) Main.java:28: error: not a statement for(int x=2;<10+2;x++) for(int y=...
s034990186
p00026
Java
import java.util.*; import java.io.*; import static java.util.Arrays.*; import static javaa.String.Math.*; public class Main { int INF = 1 << 28; double EPS = 1e-10; int OFS = 2; int[][] map; void run() { Scanner sc = new Scanner(System.in); map = new int[10 + 4][10 + 4]; for(;sc.hasNext(); ) { Stri...
Main.java:28: error: illegal start of type for(int x=2;<10+2;x++) for(int y=2;y<10+2;y++) { ^ Main.java:28: error: not a statement for(int x=2;<10+2;x++) for(int y=2;y<10+2;y++) { ^ Main.java:28: error: ')' expected for(int x=2;<10+2;x++) for(int y=2;y<10+2;y++) { ...
s175331601
p00026
Java
import java.util.*; import java.io.*; import static java.util.Arrays.*; import static javaa.String.Math.*; public class Main { int INF = 1 << 28; double EPS = 1e-10; int OFS = 2; int[][] map; void run() { Scanner sc = new Scanner(System.in); map = new int[10 + 4][10 + 4]; for(;sc.hasNext(); ) { Stri...
Main.java:5: error: package javaa.String does not exist import static javaa.String.Math.*; ^ Main.java:22: error: cannot find symbol if(val[2] == 1) small(val[0], val[1]); ^ symbol: variable val location: class Main Main.java:22: error: cannot find symbol if(val[2] == 1) smal...
s036171062
p00026
Java
import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.String.Math.*; public class Main { int INF = 1 << 28; double EPS = 1e-10; int OFS = 2; int[][] map; void run() { Scanner sc = new Scanner(System.in); map = new int[10 + 4][10 + 4]; for(;sc.hasNext(); ) { Strin...
Main.java:5: error: package java.String does not exist import static java.String.Math.*; ^ Main.java:21: error: cannot find symbol for(int i=0;i<3;i++) vals[i] = Integer.parseInt(ss[i]); ^ symbol: variable vals location: class Main Main.java:29: error: cannot fi...
s964743675
p00026
Java
package jimang_laurant.com; import java.util.Arrays; import java.util.Scanner; public class Main0026 { private static Scanner scan; public static void main(String[] args) { scan = new Scanner(System.in); scan.useDelimiter(",|\\s+"); int a[][] = new int[10][10]; for(int i = 0;i < 10;i++)Arrays.fill(a[i],0); ...
Main.java:6: error: class Main0026 is public, should be declared in a file named Main0026.java public class Main0026 { ^ 1 error
s136103445
p00026
Java
import java.util.*; public class Main{ public static void main(String[] args){ new P0026DroppingInk().run(); } Scanner sc = new Scanner(System.in); int[][] map; int h = 10; int w = 10; int[] a = {1, 0, -1, 0, 1, -1, 1, -1, 2, 0, -2, 0}; int[] b = {0, 1, 0, -1, 1, 1, -1, -1, 0, 2, 0, -2}; int count; int max;...
Main.java:4: error: cannot find symbol new P0026DroppingInk().run(); ^ symbol: class P0026DroppingInk location: class Main 1 error
s839505139
p00026
C
/* / / 2014.08.26 / / */ //真っ白な紙にインクを垂らしインク絵汚れていない部分の数を出力し、汚れる回数が多いエリアを出力する。 //落とすインク液は少しならば1、中ぐらいなら2、多いならば3とする。 #include<stdio.h> void littleDrop(int,int,int *,int); void midiumDrop(int,int *,int,int); void largeDrop(int,int *,int); void showArray(int ...
main.c: In function 'midiumDrop': main.c:102:1: error: expected declaration or statement at end of input 102 | } | ^
s060005791
p00026
C
#include <cstdio> using namespace std; int main() { int xy[10][10] = {'0'}; int x,y,size; xy[0][0] = 0; while(scanf("%d,%d,%d", &x,&y,&size) != EOF){ xy[y-1][x]++; xy[y][x-1]++; xy[y][x]++; xy[y][x+1]++; xy[y+1][x]++; if(size >=...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s022476033
p00026
C
#include <stdio.h> #include <math.h> &#160; int p[10][10]; &#160; void drop(int x,int y){ &#160;&#160;&#160;&#160;if(-1<x && x<10 && -1<y && y<10)p[x][y]++; } &#160; int main(void){ &#160; &#160;&#160;&#160;&#160;int i,j,x,y,size; &#160;&#160;&#160;&#160;for(i=0;i<10;i++){ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#16...
main.c:3:1: error: expected identifier or '(' before '&' token 3 | &#160; | ^ main.c:3:2: error: stray '#' in program 3 | &#160; | ^ main.c:5:1: error: expected identifier or '(' before '&' token 5 | &#160; | ^ main.c:5:2: error: stray '#' in program 5 | &#160; | ^ main.c: In f...
s243297173
p00026
C
#include <stdio.h> int main(void) { int a[10][10]; int i, j, x, y; int size; int max = 0, cnt = 0; for(i = 0; i < 10; i++) { for(j = 0; j < 10; j++) { a[i][j] = 0; } } while(scanf(fp, "%d,%d,%d", &x, &y, &size) && size != 0 ) { switch(size) { case 3: if(x >= 2) a[x - 2][y]++; if(y >= 2) a[x]...
main.c: In function 'main': main.c:16:21: error: 'fp' undeclared (first use in this function) 16 | while(scanf(fp, "%d,%d,%d", &x, &y, &size) && size != 0 ) { | ^~ main.c:16:21: note: each undeclared identifier is reported only once for each function it appears in
s132011593
p00026
C
#include <stdio.h> void paint(int b[][], int x, int y, int a); int main(void) { int squares[10][10] = {0}; int i, j; int x, y, size; while( scanf("%d %d %d", &x, &y, &size) != EOF) { switch( size) { case 1: squares[y][x]++; paint( squares, x, y, 1); break; case 3: paint( squares, x, y, 2);...
main.c:3:16: error: array type has incomplete element type 'int[]' 3 | void paint(int b[][], int x, int y, int a); | ^ main.c:3:16: note: declaration of 'b' as multidimensional array must have bounds for all dimensions except the first main.c: In function 'main': main.c:13:40: error: type of fo...
s700146350
p00026
C
#include <stdio.h> int main(void) { int i,j,x,y,s,max; int board[14][14]={0}; int sibuki_x[13][3]={{0,1,0,-1,0},{0,1,1,1,0,-1,-1,-1,0},{0,1,1,1,0,-1,-1,-1,0,0,2,0,-2}}; int sibuki_y[13][3]={{-1,0,1,0,0},{-1,-1,0,1,1,1,0,-1,0},{-1,-1,0,1,1,1,0,-1,0,2,0,-2,0}}; while(scanf("%d",&x)!=EOF){ scanf("%d%d",&y,&s); ...
main.c: In function 'main': main.c:6:37: warning: excess elements in array initializer 6 | int sibuki_x[13][3]={{0,1,0,-1,0},{0,1,1,1,0,-1,-1,-1,0},{0,1,1,1,0,-1,-1,-1,0,0,2,0,-2}}; | ^ main.c:6:37: note: (near initialization for 'sibuki_x[0]') main.c:6:40: warning:...
s990414975
p00026
C
#include <stdio.h> void color(int map[10][10], int x, int y) { if (0 <= x && x <= 9 && 0 <= y && y <= 9){ map[y][x]++; } } int main(void) { int map[10][10] = {0}; int x, y, size; int i, j; int white = 0, darkest = 0; while (scanf("%d,%d,%d", &x, &y, &size) != EOF){ map[y][x]++; if (size ...
main.c: In function 'main': main.c:44:11: error: 'mostdark' undeclared (first use in this function) 44 | if (mostdark < map[i][j]){ | ^~~~~~~~ main.c:44:11: note: each undeclared identifier is reported only once for each function it appears in
s281502727
p00026
C
#include <stdio.h> void color(int map[10][10], int x, int y) { if (0 <= x && x <= 9 && 0 <= y && y <= 9){ map[y][x]++; } } int main(void) { int map[10][10] = {0}; int x, y, size; int i, j; int white = 0, darkest = 0; while (scanf("%d,%d,%d", &x, &y, &size) != EOF){ map[y][x]++; if (size ...
main.c: In function 'main': main.c:44:11: error: 'mostdark' undeclared (first use in this function) 44 | if (mostdark < map[i][j]){ | ^~~~~~~~ main.c:44:11: note: each undeclared identifier is reported only once for each function it appears in
s144533212
p00026
C
#include <stdio.h> int main(void) { int size; int x, y; int white, black; int i, j; int seat[10][10] = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0,...
main.c: In function 'main': main.c:22:9: error: expected ',' or ';' before 'while' 22 | while (1){ | ^~~~~
s778406314
p00026
C
#include<stdio.h> void small(int a[][10],int x,int y); void mid(int a[][10],int x,int y); void large(int a[][10],int x,int y); int main(void){ int paper[10][10]; int x,y,q,i,j,count; int max=0; for(j=0;j<10;j++){ for(i=0;i<10;i++){ paper[i][j]=0; } } while(scanf("%d,%d,%d",&x,&y,&q)!=EOF){...
main.c: In function 'main': main.c:33:10: error: 'map' undeclared (first use in this function); did you mean 'max'? 33 | if(map[y][x]>max){ | ^~~ | max main.c:33:10: note: each undeclared identifier is reported only once for each function it appears in
s571347496
p00026
C
#include<stdio.h> int main(void){ int paper[10][10]; int x,y,q,i,j,count,a; int px,py; int max=0; int xplus[] = {0,0,-1,1,-1,-1,1,1,0,0,-2,2}; int yplus[] = {-1,1,0,0,-1,1,-1,1,-2,2,0,0}; for(j=0;j<10;j++){ for(i=0;i<10;i++){ paper[i][j]=0; } } for( scanf("%d,%d,%d",&x,&y,&q)!=EOF){ ...
main.c: In function 'main': main.c:18:39: error: expected ';' before ')' token 18 | for( scanf("%d,%d,%d",&x,&y,&q)!=EOF){ | ^ main.c:18:39: error: expected expression before ')' token
s361878313
p00026
C
#include<stdio.h> int main(void){ int paper[10][10]; int x,y,q,i,j,count,a; int px,py; int max=0; int xplus[] = {0,0,-1,1,-1,-1,1,1,0,0,-2,2}; int yplus[] = {-1,1,0,0,-1,1,-1,1,-2,2,0,0}; for(j=0;j<10;j++){ for(i=0;i<10;i++){ paper[i][j]=0; } } for( scanf("%d,%d,%d",&x,&y,&q)!=EOF){ ...
main.c: In function 'main': main.c:18:39: error: expected ';' before ')' token 18 | for( scanf("%d,%d,%d",&x,&y,&q)!=EOF){ | ^ main.c:18:39: error: expected expression before ')' token
s318498494
p00026
C
#include <stdio.h> #define rep(i,j,k) for(i = j;i <= k;i++) int paper[14][14]; rep(i,0,13){ rep(j,0,13){ paper[i][j] = 0; } } void Ink(int,int,int); int main(){ int x,y,size,i,j,count,depth; while(scanf("%d,%d,%d",&x,&y,&size) != EOF){ Ink(x+2,y+2,size); } count = 0; depth = 0; rep(...
main.c:2:20: error: expected identifier or '(' before 'for' 2 | #define rep(i,j,k) for(i = j;i <= k;i++) | ^~~ main.c:5:3: note: in expansion of macro 'rep' 5 | rep(i,0,13){ | ^~~ main.c:2:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token 2 | #d...
s939997337
p00026
C
#include <stdio.h> #define rep(i,j,k) for(i = j;i <= k;i++) int i,j; int paper[14][14]; rep(i,0,13){ rep(j,0,13){ paper[i][j] = 0; } } void Ink(int,int,int); int main(){ int x,y,size,i,j,count,depth; while(scanf("%d,%d,%d",&x,&y,&size) != EOF){ Ink(x+2,y+2,size); } count = 0; depth = 0...
main.c:2:20: error: expected identifier or '(' before 'for' 2 | #define rep(i,j,k) for(i = j;i <= k;i++) | ^~~ main.c:5:3: note: in expansion of macro 'rep' 5 | rep(i,0,13){ | ^~~ main.c:2:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token 2 | #d...
s511754159
p00026
C
#include <stdio.h> /** Problem 0026 : Dropping Ink **/ int board[10][10]; void init(void) { int i, j; for (i=0; i<10; i++) { for (j=0; j<10; j++) { board[i][j] = 0; } } } int main(void) { int i, j, ii, jj, size; init(); while (scanf("%d,%d,%d", &i, &j, &size) != EOF) { switch (size) { case 1: ...
main.c: In function 'main': main.c:40:57: error: expected expression before '>' token 40 | if (ii => 0 && ii < 10 && jj => 0 && jj < 10) board[ii][jj] += 1; | ^
s347725959
p00026
C
#define a(x,y) a[x][y]++ a[99][99],x,y,z,i; main() { for(;~scanf("%d,%d,%d",&x,&y,&z);) { x+=10;y+=10; a(x,y); a(x-1,y); a(x,y-1); a(x+1,y); a(x,y+1); if(z>1) a(x+1,y+1),a(x+1,y-1),a(x-1,y+1),a(x-1,y-1); if(z>2) a(x-2,y),a(x+2,y),a(x,y-2),a(x,y+2); } ...
main.c:2:1: warning: data definition has no type or storage class 2 | a[99][99],x,y,z,i; | ^ main.c:2:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:2:11: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int] 2 | a[99][99],x,y,z,i; | ^ main.c:...
s247777525
p00026
C
#include<stdio.h> void main(){ printf("77\n5\n); }
main.c: In function 'main': main.c:4:8: warning: missing terminating " character 4 | printf("77\n5\n); | ^ main.c:4:8: error: missing terminating " character 4 | printf("77\n5\n); | ^~~~~~~~~~ main.c:5:1: error: expected expression before '}' token 5 | } | ^ main.c:4:8: error...