submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s729658166
p03695
C++
#include <bits/stdc++.h> using namespace std; int a[101]; int cnt,x,b,c,d,e,f,g,h,ans; int main() { int n; cin>>n; for(int i=0;i<n;i++) cin>>a[i]; sort(a,a+n); for(int i=0;i<n;i++) { if(a[i]>=0 && a[i]<=399)x=1; else if(a[i]>=400 && a[i]<=799)b=1; else if(a[i]>=800 && a[i]<=...
a.cc: In function 'int main()': a.cc:23:34: error: cannot convert 'std::basic_ostream<char>' to 'int' in return 23 | if(ans==0) return cout<<1<<' '<<cnt; | ~~~~~~~~~~~~^~~~~ | | | std::basic_ostream<char>
s267704642
p03695
C++
#include<iostream> #include<fstream> #include<bitset> #include<string> #include<vector> #include<algorithm> #include<cmath> #include<map> #include<set> #include<iomanip> #include<queue> #include<stack> #include<numeric> #include<utility> #include<regex> #include<climits> void Init() { std::cin.tie(0); std::ios::sync_...
a.cc: In function 'int main()': a.cc:379:20: error: no matching function for call to 'max(LL&, int)' 379 | cout << max(ans,1) <<" "<< ans + color[8]; | ~~~^~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s775369642
p03695
C++
#include <bits/stdc++.h> #define mod 1000000007 #define rep(i, n) for(int i=0; i<n; ++i) using namespace std; typedef long long ll; const long long INF = 1LL << 60; int main(void){ int N, count = 0, ans = 0; cin >> N; bool check[8]; check.assign(N, false); rep(i, N){ int a; cin >> a; if(a <= 399...
a.cc: In function 'int main()': a.cc:18:15: error: request for member 'assign' in 'check', which is of non-class type 'bool [8]' 18 | check.assign(N, false); | ^~~~~~
s562771515
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> a(n); vector<int> iro(8); int tuyotuyo=0; for(int i=0;i<n;i++){ cin >> a.at(i); } sort(a.begin(),a.end()); for(int k: a){ if(1<=k && k<400){ iro.at(0)++; } if(400<=k && k<800){ iro.at...
a.cc: In function 'int main()': a.cc:46:30: error: expected ';' before 'cout' 46 | sort(iro.begin(),iro.end()) | ^ | ; 47 | 48 | cout << iro(0) << iro(7)+tuyotuyo << endl; | ~~~~
s321097744
p03695
C++
#include <iostream> #include <string> #include <vector> #include <set> #include <algorithm> #include <cctype> #include <cmath> #include <queue> #include <map> #include <numeric> #include <unordered_map> #include <iomanip> #include <functional> #include <bitset> #include <complex> #include <stack> #define rep(i, n) f...
a.cc: In function 'int main()': a.cc:45:26: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<' 45 | cout<<se.size()-se[8]>0<<" "<<max(se.size(),se.size()+se[8]-1); | ~^~~~~ | | | | | const ch...
s368593931
p03695
C++
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast") #define rep(i,n) for(int i = 0;i<n;i++) const long long MOD = 1000000007; int main(){ int n;cin >> n; int type[9] = {}; rep(i,n){ int rate;cin >> rate; rate /= 400; if(rate>= 8) rate = 8; type[ra...
a.cc: In function 'int main()': a.cc:24:39: error: expected '}' at end of input 24 | cout << small <<" "<< large<<endl; | ^ a.cc:9:11: note: to match this '{' 9 | int main(){ | ^
s191010503
p03695
Java
import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { Solver solver = new Solver(); solver.solve(); solver.exit(); } static class FastScanner { private final InputStream in = System.in; private final byte[] buffer = new byte[1024]; private int ptr = 0; priv...
Main.java:532: error: no suitable method found for prt(int,int) prt(cnt.length, cnt.length); ^ method Solver.prt() is not applicable (actual and formal argument lists differ in length) method Solver.prt(int) is not applicable (actual and formal argument lists differ in length) method Solver....
s394019736
p03695
Java
import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { Solver solver = new Solver(); solver.solve(); solver.exit(); } static class FastScanner { private final InputStream in = System.in; private final byte[] buffer = new byte[1024]; private int ptr = 0; priv...
Main.java:529: error: illegal start of expression int x = ? cnt[cnt.length - 1][1] : 0; ^ 1 error
s452666848
p03695
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; const auto INF = (ll)1e9+7; using p = pair<int,int>; using v = vector<int>; auto c = vector<int>(9,0); void color(int i){ if(i<3200) c[i/400]++; }else{ c[8]++; } } int main(){ int n; cin >> n; auto a = vector<int>(n,0); for (i...
a.cc:12:10: error: expected unqualified-id before 'else' 12 | }else{ | ^~~~ a.cc:15:1: error: expected declaration before '}' token 15 | } | ^
s107106376
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,x,ans=0; vector<int> a(9,0); cin >> N; for(int i=0;i<N;i++){ cin >> x; for(int j=0;j<9;j++){ if(j==8){ if(j*400<=x){ a[j]++; } }else(j*400<=x && x<400...
a.cc: In function 'int main()': a.cc:16:43: error: expected ';' before '{' token 16 | }else(j*400<=x && x<400*(j+1)){ | ^ | ;
s281034009
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,x,ans=0; vector<int> a(9,0); cin >> N; for(int i=0;i<N;i++){ cin >> x; for(int j=0;j<9;j++){ if(j==8){ if(j*400<=x){ a[j]++; }else(j*400<=x && x<400*(j+1)){ ...
a.cc: In function 'int main()': a.cc:15:43: error: expected ';' before '{' token 15 | }else(j*400<=x && x<400*(j+1)){ | ^ | ; a.cc:28:2: error: expected '}' at end of input 28 | } | ^ a.cc:5:11: note...
s185540891
p03695
C++
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define rep(i, n) REP(i, 0, n) #define ALL(v) v.begin(), v.end() #define MSG(a) cout << #a << " " << a << endl; #define REP(i, x, n) for (int i = x; i < n; i++) #define OP(m) cout << m << endl typedef long long ll; typedef unsigned long long ull; ...
a.cc: In function 'int main()': a.cc:65:13: warning: ISO C++ forbids incrementing a pointer of type 'void (*)(void*) noexcept' [-Wpointer-arith] 65 | free++; | ^~~~ a.cc:65:17: error: lvalue required as increment operand 65 | free++; | ^~ a.cc:68:38:...
s358353630
p03695
C++
#include <bits/stdc++.h> #define all(x) begin(x), end(x) #define dbg(x) cerr << #x << " = " << x << endl #define _ << ' ' << using namespace std; using ll = long long; using vi = vector<int>; int a[9] = { 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 10000 }; int b[9]; int main() { ios::sync_with_stdio(false); ...
a.cc: In function 'int main()': a.cc:31:38: error: no matching function for call to 'min(int)' 31 | cout << max(1, sol) << ' ' << min(sol + b[8]); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/...
s212219292
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; set<int> st; int cnt = 0; int a; for ( int i = 0; i < n; i++){ cin >> a; if ( a/400 >= 8){ cnt ++; } else { st.insert(a/400); } } cout << max(st.size(), 1) << " " << st.size() + cnt << endl; return...
a.cc: In function 'int main()': a.cc:19:14: error: no matching function for call to 'max(std::set<int>::size_type, int)' 19 | cout << max(st.size(), 1) << " " << st.size() + cnt << endl; | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x...
s424825398
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; set<int> st; int cnt = 0; int a; for ( int i = 0; i < n; i++){ cin >> a; if ( a/400 >= 8){ cnt ++; } else { st.insert(a/400); } } cout << min(st.size(), 1) << " " << st.size() + cnt << endl; return...
a.cc: In function 'int main()': a.cc:19:14: error: no matching function for call to 'min(std::set<int>::size_type, int)' 19 | cout << min(st.size(), 1) << " " << st.size() + cnt << endl; | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x...
s985463783
p03695
C++
#include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <iomanip> #include <cstring> #define rep(i, N) for (int i = 0; i < (int)N; i++) using namespace std; typedef long long ll; const ll LLINF = 9223372036854775807; const int MOD = 1000000007; int main() { int N; cin >> N; int a[N]; r...
a.cc: In function 'int main()': a.cc:24:24: error: expected ';' before 'cout' 24 | r_min = max(r_min, 1) | ^ | ; 25 | cout << r_min << " " << r_max << endl; | ~~~~
s649824697
p03695
C++
#include <iostream> #include <cstdlib> #include <vector> #include <algorithm> #include <string> #include <cmath> #include <new> #include <map> using namespace std; int main() { int N,g,b,gr,w,b,y,o,r,ans,sai,max,min; cin >> N; vector<int> A(N,0); for(int i = 0; i < N;i++){ cin >> A[i]; if(A[i] < 400){ g...
a.cc: In function 'int main()': a.cc:13:24: error: redeclaration of 'int b' 13 | int N,g,b,gr,w,b,y,o,r,ans,sai,max,min; | ^ a.cc:13:17: note: 'int b' previously declared here 13 | int N,g,b,gr,w,b,y,o,r,ans,sai,max,min; | ^
s807854750
p03695
C++
#include <iostream> #include <cstdlib> #include <vector> #include <algorithm> #include <string> #include <cmath> #include <new> #include <map> using namespace std; int main() { int N,g,b,gr,w,b,y,o,r,ans,sai,max,min; cin >> N; vector<int> A(N,0); for(int i = 0; i < N;i++){ cin >> A[i]; if(A[i] < 400){ g...
a.cc: In function 'int main()': a.cc:13:24: error: redeclaration of 'int b' 13 | int N,g,b,gr,w,b,y,o,r,ans,sai,max,min; | ^ a.cc:13:17: note: 'int b' previously declared here 13 | int N,g,b,gr,w,b,y,o,r,ans,sai,max,min; | ^
s172056555
p03695
C++
#include <iostream> #include <cstdlib> #include <vector> #include <algorithm> #include <string> #include <cmath> #include <new> #include <map> using namespace std; int main() { int N,g,b,gr,w,b,y,o,r,ans,sai,max,min; cin >> N; vector<int> A(N,0); for(int i = 0; i < N;i++){ cin >> A[i]; if(A[i] < 400){ g...
a.cc: In function 'int main()': a.cc:13:24: error: redeclaration of 'int b' 13 | int N,g,b,gr,w,b,y,o,r,ans,sai,max,min; | ^ a.cc:13:17: note: 'int b' previously declared here 13 | int N,g,b,gr,w,b,y,o,r,ans,sai,max,min; | ^ a.cc: At global scope:...
s674956198
p03695
C++
#include <iostream> #include <cstdlib> #include <vector> #include <algorithm> #include <string> #include <cmath> #include <new> #include <map> using namespace std; int main() { int N,g,b,gr,w,b,y,o,r,ans,sai,max,min; cin >> N; vector<int> A(N,0); for(int i = 0; i < N;i++){ cin >> A[i]; } for(int j = 0;j < ...
a.cc: In function 'int main()': a.cc:13:24: error: redeclaration of 'int b' 13 | int N,g,b,gr,w,b,y,o,r,ans,sai,max,min; | ^ a.cc:13:17: note: 'int b' previously declared here 13 | int N,g,b,gr,w,b,y,o,r,ans,sai,max,min; | ^
s622444432
p03695
C++
#include <bits/stdc++.h> #include <type_traits> using namespace std; using ll = int64_t; #define int ll #define FOR(i, a, b) for (int i = int(a); i < int(b); i++) #define REP(i, b) FOR(i, 0, b) #define MP make_pair #define PB push_back #define EB emplace_back #define ALL(x) x.begin(), x.end() using pi = pair<int, in...
a.cc: In function 'int main()': a.cc:99:12: error: no matching function for call to 'max(ll&, int)' 99 | print(max(ans, 1), 2); | ~~~^~~~~~~~ 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...
s256702064
p03695
Java
import java.util.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] a = new int[N]; Map<String, Integer> map = new HashMap<>(); for(int i = 0; i < N; i++){ a[i] = sc.nextInt(); ...
Main.java:40: error: cannot find symbol if(map.size() == 1 && !(map.containKey("all"))){ ^ symbol: method containKey(String) location: variable map of type Map<String,Integer> 1 error
s736523101
p03695
Java
import java.util.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] a = new int[N]; Map<String, Integer> map = new HashMap<>(); for(int i = 0; i < N; i++){ a[i] = sc.nextInt(); ...
Main.java:53: error: not a statement System.out.println(min + " " + max);s ^ Main.java:53: error: ';' expected System.out.println(min + " " + max);s ^ 2 errors
s816683469
p03695
Java
mport java.util.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] a = new int[N]; Map<String, Integer> map = new HashMap<>(); for(int i = 0; i < N; i++){ a[i] = sc.nextInt(); ...
Main.java:1: error: class, interface, enum, or record expected mport java.util.*; ^ 1 error
s755181852
p03695
C++
#include <iostream> #include <vector> #include <map> using namespace std; int N; int main(){ cin >> N; map<char,int> m; for(int i = 0; i < N; i++){ int tmp; cin >> tmp; if(tmp >= 1 && tmp < 400)m['g']++; else if(tmp >= 400 && tmp < 800)m['n']++; else if(tmp >= 800 && tmp < 1200)m['e...
a.cc: In function 'int main()': a.cc:31:47: error: 'i' was not declared in this scope 31 | for(auto iter = m.begin(); iter != m.end(); i++){ | ^
s784315843
p03695
C++
#include <iostream> #include <vector> #include <map> using namespace std; int N; int main(){ cin >> N; map<char,int> m; for(int i = 0; i < N; i++){ int tmp; cin >> tmp; if(tmp >= 1 && tmp < 400)m['g']++; else if(tmp >= 400 && tmp < 800)m['n']++; else if(tmp >= 800 && tmp < 1200)m['e...
a.cc: In function 'int main()': a.cc:31:34: error: expected ';' before '!=' token 31 | for(auto iter = m.begin(), iter != m.end(), i++){ | ^~~ | ; a.cc:31:35: error: expected primary-expression before '!=' token 31 | for(auto iter =...
s565524134
p03695
C++
#include <bins/stdc++.h> using namespace std; int main() { int N; cin >> N; const segNum 8; int colorCnt[segNum+1]; for (int i = 0; i < N; i++) { int a; cin >> a; for (int j = 0; j < segNum; j++) { if (j*400 <= a && a < (j+1)*400) { colorCnt[j] = 1; } } if (a >= 400*...
a.cc:1:10: fatal error: bins/stdc++.h: No such file or directory 1 | #include <bins/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s189596497
p03695
C++
#include <bits/stdc++.h> #define REP(i, n) for(ll i = 0; i < (ll)n; i++) #define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF (1ll << 60) using namespace std; typedef long long ll; typedef double db; typedef string str; typedef pair<ll, ll> p; constexpr int MOD = ...
a.cc: In function 'int main()': a.cc:41:16: error: 'buf' was not declared in this scope 41 | cin >> buf; | ^~~ a.cc:68:5: error: 'ans1' was not declared in this scope 68 | ans1 = cnt; | ^~~~ a.cc:69:5: error: 'ans2' was not declared in this scope 69 | ans2 = cnt +...
s659434426
p03695
C++
#include <stdio.h> #include <iostream> #include <algorithm> #include <sstream> #include <complex> #include <vector> #include <list> #include <queue> #include <deque> #include <stack> #include <set> #include <map> #include <cstdio> #include <string> #include <cstdlib> #include <cstring> #include <bits/stdc++.h> using na...
a.cc: In function 'int main()': a.cc:141:12: error: scalar object 'answer' requires one element in initializer 141 | ll answer={1,1}; | ^~~~~~
s673559405
p03695
C++
#include <iostream> #include <map> using namespace std; int main() { int n; int vip=0; set<int> s; for (int i=0; i<n; i++) { int c; cin >> c; if (c < 400) s.insert(1); for (int j=1; j<=7; j++) { if (400*j <= c && c < 400*j+400) s.insert(j+1); } if (c >= 3200) vip++; } int so = ...
a.cc: In function 'int main()': a.cc:8:3: error: 'set' was not declared in this scope 8 | set<int> s; | ^~~ a.cc:3:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 2 | #include <map> +++ |+#include <set> 3 | using namespace std; a.cc:8:7: erro...
s638513513
p03695
C++
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> cols(9); for (int i=0; i<N; ++i) { int rate; cin >> rate; int start = 0; for (int j=0; start!=2800; start+=400, ++j) { if (start <= rate <= start + 399) { ++cols[j]; break; } ...
a.cc: In function 'int main()': a.cc:20:14: error: 'j' was not declared in this scope 20 | ++cols[j+1]; | ^
s901968103
p03695
C++
#include <iostream> #include <vector> #include <iomanip> #include <string> #include <sstream> #include <algorithm> #include <map> #include <bits/stdc++.h> using namespace std; #define REP(i,n) FOR(i,0,n) #define FOR(i,a,b) for(long long i=(a),i##Len_=(b);i<i##Len_;i++) typedef long long ll; static const ll MOD = 10000...
a.cc: In function 'int main()': a.cc:53:18: error: no matching function for call to 'max(int, ll&)' 53 | ll iMin = max(1,cnt); | ~~~^~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/inclu...
s923583332
p03695
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> P; typedef tuple<ll,ll,ll> TUP; #define a first #define b second #define sz size() #define pb(x) push_back(x) #define bg begin() #define ed end() #define rep(i,n) for(ll i=0;i<n;i++) #define rep1(i,n) for(ll i=1;i<=n;i++) #define m...
a.cc: In function 'int main()': a.cc:59:31: error: no matching function for call to 'max(int, ll&)' 59 | printf("%lld %lld",max(1,C),C+cnt); | ~~~^~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc...
s129714667
p03695
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int a){ double b=a; b=log10(b); int c=b; return c+1; } int souwa(int a...
a.cc: In function 'int main()': a.cc:72:14: error: expected primary-expression before '<<' token 72 | cout<<1<<<<endl<<b.at(8)<<endl; | ^~
s813552041
p03695
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int a){ double b=a; b=log10(b); int c=b; return c+1; } int souwa(int a...
a.cc: In function 'int main()': a.cc:63:13: error: no matching function for call to 'min(int, long long int)' 63 | b.at(min(8,c/400))++; | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s221727093
p03695
C
#include <stdio.h> int main(){ int N,a[110],i,num[10],temp,sum,max,min; //Nとa[i]を入力 scanf("%d",&N); for(i=0; i<N; i++){ scanf("%d",&a[i]); } //num[i],sum,max,minを初期化 for(i=0; i<9; i++){num[i]=0;} sum=0; max=-1; min=10; //a[i]がどのクラスnum[i]に入るか分別 //num[i]該当者がいればnum[i]をインクリ for(i=0; i<N; ...
main.c: In function 'main': main.c:29:15: error: subscripted value is neither array nor pointer nor vector 29 | max=sum+temp[8]; | ^
s926320878
p03695
C
#include <stdio.h> int main(){ int N,a[110],i,num[10],temp,sum,max,min; //Nとa[i]を入力 scanf("%d",&N); for(i=0; i<N; i++){ scanf("%d",&a[i]); } //num[i],sum,max,minを初期化 for(i=0; i<9; i++){num[i]=0;} sum=0; max=-1, min=10 //a[i]がどのクラスnum[i]に入るか分別 //num[i]該当者がいればnum[i]をインクリ for(i=0; i<N; i...
main.c: In function 'main': main.c:14:24: error: expected ';' before 'for' 14 | sum=0; max=-1, min=10 | ^ | ; ...... 18 | for(i=0; i<N; i++){ | ~~~ main.c:29:15: error: subscripted value is neither array nor pointer nor vecto...
s868090824
p03695
C
#include <stdio.h> main(){ int N,a[110],i,num[10],temp,sum,max,min; //Nとa[i]を入力 scanf("%d",&N); for(i=0; i<N; i++){ scanf("%d",&a[i]); } //num[i],sum,max,minを初期化 for(i=0; i<9; i++){num[i]=0;} sum=0; max=-1, min=10 //a[i]がどのクラスnum[i]に入るか分別 //num[i]該当者がいればnum[i]をインクリ for(i=0; i<N; i++){...
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:14:24: error: expected ';' before 'for' 14 | sum=0; max=-1, min=10 | ^ | ; ...... 18 | for(i=0; i<N; i++){ | ~~~ ...
s366597633
p03695
C
#include <stdio.h> main(){ int N,a[110],i,num[10],temp,sum,max,min; //Nとa[i]を入力 scanf("%d",&N); for(i=0; i<N; i++){ scanf("%d",a[i]); } //num[i],sum,max,minを初期化 for(i=0; i<9; i++){num[i]=0;} sum=0; max=-1, min=10 //a[i]がどのクラスnum[i]に入るか分別 //num[i]該当者がいればnum[i]をインクリ for(i=0; i<N; i++){ ...
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:14:24: error: expected ';' before 'for' 14 | sum=0; max=-1, min=10 | ^ | ; ...... 18 | for(i=0; i<N; i++){ | ~~~ ...
s036842641
p03695
C
#include <stdio.h> main(){ int N,a[100],color[8],sum,i,temp,max; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d",&a[i]); } for(i=0;i<8;i++){color[i]=0;} sum=0; max=-1; for(i=0;i<N;i++){ temp=a[i]/400; if(temp>8){temp=7;} color[temp]++; } for(i=0;i<8;i++){ if(max<=color[i]){...
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:22:27: error: 'clor' undeclared (first use in this function); did you mean 'color'? 22 | if(max<=color[i]){max=clor[i];} | ^~~~ | ...
s441721254
p03695
C
#include <stdio.h> main(){ int N,a[100],color[8],sum,i,temp,max; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d",&a[i]); } for(i=0;i<8;i++){color[i]=0;} sum=0; max=-1; for(i=0;i<N;i++){ temp=a[i]/400; if(temp>8){temp=7;} color[temp]++; } for(i=0;i<7;i++){ if(max<=color[i]){...
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:22:27: error: 'clor' undeclared (first use in this function); did you mean 'color'? 22 | if(max<=color[i]){max=clor[i];} | ^~~~ | ...
s698351554
p03695
C++
#include <bits/stdc++.h> using namespace std; #define LL long long #define REP(i, n) for(int i = 0; i < (int)(n); i++) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define ALL(x) (x).begin(),(x).end() const int IINF = 1e9; const LL LINF = 1e18; const LL mod = 1e9+7; int main() { int N; cin >> N; int a[N]; ...
a.cc: In function 'int main()': a.cc:28:5: error: expected ',' or ';' before 'cout' 28 | cout << mn << " " << mx << endl; | ^~~~
s510610727
p03695
C++
// template #include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<long long, long long> LP; #define INF 999999999 #define MOD 1000000007 #define REP(i, n) for(ll i = 0, i##_len = (n); i < i##_len; ++i) #define REP_AB(i, a, b) for (ll i = ll(a); i <= ll(b); ++i) #define ALL(v) v.begin(), v...
a.cc: In function 'int main()': a.cc:46:15: error: no matching function for call to 'max(int, ll&)' 46 | out << max(1, ans) << " " << ans + rate[8] << endl; | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc+...
s635484117
p03695
C++
#include <bits/stdc++.h> using namespace std ; #define DEBUG(x) cout << '>' << #x << ':' << x << endl; #define mem(x,val) memset((x),(val),sizeof(x)) #define all(x) x.begin(),x.end() #define pb push_back #define mp make_pair #define PI acos(-1.0) #define N 111111 const int INF = 1 << 30 ; typedef long long ll ; type...
a.cc: In function 'int main()': a.cc:23:20: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int') 23 | if(a<=399)color[0]++ ; | ^ a.cc:34:14: error: no matching function for call to 'max(std::set<int>::size_type, int)' 34 | cout << max(color.size(),1) << ' '...
s026645945
p03695
C++
#include<bits/stdc++.h> using namespace std; #define lp(i,n) for(int i=0;i<n;i++) #define lps(i,j,n) for(int i=j;i<n;i++) #define fordebug int hoge;cin>>hoge; #define DEKAI 1000000007; #define INF (1<<28) #define int long long #define double long double #define floot10 cout<<fixed<<setprecision(10) int x[9]; sign...
a.cc: In function 'int main()': a.cc:23:10: error: no matching function for call to 'min(long long int&, int)' 23 | x[min(a,8)]++; | ~~~^~~~~ 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...
s390531571
p03695
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<cstdlib> #include<tuple> #define int long using namespace std; signed main() { int N; cin >> N; int A = 0; int B = 0; int C = 0; int D = 0; int E = 0; int F = 0; int G = 0; int H = 0; int I = 0; for(int i = 0...
a.cc: In function 'int main()': a.cc:89:9: error: expected '}' before 'else' 89 | else if(answer != 0 && I == 0) { | ^~~~ a.cc:82:35: note: to match this '{' 82 | if(answer == 0 && I != 0) { | ^
s831474783
p03695
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;++i) using namespace std; signed main(){ int a; int c=0; int d=0; int e=0; int f=0; int g=0; int h=0; int j=0; int k=0; int l=0; int m=0; cin>>a; vector<int> b(a); rep(i,a) cin>>b.at(i); rep(i,b.size()){ ...
a.cc: In function 'int main()': a.cc:66:20: error: expected ';' before 'else' 66 | cout<<1<<' '<<e | ^ | ; 67 | else | ~~~~
s342369150
p03695
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;++i) using namespace std; signed main(){ int a; int c=0; int d=0; int e=0; int f=0; int g=0; int h=0; int j=0; int k=0; int l=0; cin>>a; vector<int> b(a); rep(i,a) cin>>b.at(i); rep(i,b.size()){ if(b.at(i)<...
a.cc: In function 'int main()': a.cc:62:6: error: expected '}' at end of input 62 | } | ^ a.cc:5:14: note: to match this '{' 5 | signed main(){ | ^
s680582185
p03695
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;++i) using namespace std; signed main(){ int a; int c=0; int d=0; int e=0; int f=0; int g=0; int h=0; int j=0; int k=0; int l=0; cin>>a; vector<int> b(a); rep(i,a) cin>>b.at(i); rep(i,b.size()){ if(b.at(i)<...
a.cc: In function 'int main()': a.cc:60:10: error: expected '}' at end of input 60 | } | ^ a.cc:20:18: note: to match this '{' 20 | rep(i,b.size()){ | ^ a.cc:60:10: error: expected '}' at end of input 60 | } | ^ a.cc:5:14: note: to match th...
s233864225
p03695
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;++i) using namespace std; int main(){ int a; int c=0; int e=0; cin>>a; vector<int> b(a); rep(i,a) cin>>b.at(i); rep(i,b.size()){ if(b.at(i)<400){ int d=0; d++; if(d==1) c++; } if(400...
cc1plus: error: '::main' must return 'int'
s906100698
p03695
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;++i) using namespace std; int main{ int a; int c=0; int e=0; cin>>a; vector<int> b(a); rep(i,a) cin>>b.at(i); rep(i,b.size()){ if(b.at(i)<400){ int d=0; d++; if(d==1) c++; } if(400<=b.at(i)&&b.at(i)<800){...
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main{ | ^~~~ a.cc:5:3: error: expected primary-expression before 'int' 5 | int a; | ^~~ a.cc:5:3: error: expected '}' before 'int' a.cc:4:9: note: to match this '{' 4 | int main{ | ^ a.cc:8:3: error: '...
s659946226
p03695
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;++i) using namespace std; int main{ int a; int c=0; int e=0; cin>>a; vector<int> b(a); rep(i,a) cin>>b.at(i); rep(i,b.size()){ if(b.at(i)<400){ int d=0; d++; if(d==1) c++; } if(400<=...
a.cc:5:5: error: cannot declare '::main' to be a global variable 5 | int main{ | ^~~~ a.cc:2:13: error: expected primary-expression before 'long' 2 | #define int long long | ^~~~ a.cc:6:3: note: in expansion of macro 'int' 6 | int a; | ^~~ a.cc:2:13: error: expected '}'...
s981091911
p03695
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;++i) using namespace std; int main{ int a; int c=0; int e=0; cin>>a; vector<int> b(a); rep(i,a) cin>>b.at(i); rep(i,b.size()){ if(b.at(i)<400){ int d=0; d++; if(d==1) c++; } if(400<=...
a.cc:5:5: error: cannot declare '::main' to be a global variable 5 | int main{ | ^~~~ a.cc:2:13: error: expected primary-expression before 'long' 2 | #define int long long | ^~~~ a.cc:6:3: note: in expansion of macro 'int' 6 | int a; | ^~~ a.cc:2:13: error: expected '}'...
s819066075
p03695
C++
#include <iostream> #include <string> #include <cstring> #include <algorithm> #include <functional> #include <cmath> #include <set> #include <queue> #include <vector> #include <climits> #include <sstream> #include <iomanip> #include <map> #include <stack> using namespace std; int main() { int N; cin >> N; auto ove...
a.cc: In function 'int main()': a.cc:39:39: error: no matching function for call to 'min(unsigned int, std::set<int>::size_type)' 39 | cout << s.size() << " " << min(8u, s.size() + over) << endl; | ~~~^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/str...
s953509417
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<pair<int, int>q(n); for(int i=0; i<n; ++i){ int a=0; cin >> a; int b=0; if(a<=399) b=0; else if(a>400 && a<=799) b=1; else if(a>800 && a<=1199) b=2; else if(a>1200 && a<=1599) b=3; ...
a.cc: In function 'int main()': a.cc:8:27: error: template argument 1 is invalid 8 | vector<pair<int, int>q(n); | ^ a.cc:8:27: error: template argument 2 is invalid a.cc:29:5: error: 'q' was not declared in this scope 29 | q[i]=make_pair(b ,a); | ^ a.cc:33:8: error...
s280554387
p03695
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define ub upper_bound #define lb upper_bound #define mp make_pair #define F first #define S second #define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++) #define REP(i,n) FOR(i,0,n) #define ALL(a) (a).begin(),(a).end() #define RALL(a...
a.cc: In function 'bool solve()': a.cc:61:20: error: no matching function for call to 'min(int, long long int)' 61 | cout << min(9,tmp + col[9]) << endl; | ~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++...
s187016806
p03695
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
a.cc: In function 'int main()': a.cc:119:9: error: overloaded function with no contextual type information 119 | min = ans; | ^~~
s138026185
p03695
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int (i) = 0; (i) < (n); (i)++) typedef long long ll; int main() { int n; cin >> n; int a, mini = 0, maxi = 0; rep(i, n) { cin >> a; if(a < 3200) { maxi++; mini++; else { maxi++; } } cout << mini << maxi ...
a.cc: In function 'int main()': a.cc:15:5: error: expected '}' before 'else' 15 | else { | ^~~~ a.cc:12:18: note: to match this '{' 12 | if(a < 3200) { | ^
s754081004
p03695
C++
#include <bits/stdc++.h> #include<algorithm> #include<math.h> using namespace std; template <class T> using V = vector<T>; using ll = long long; using db = double; using st = string; using ch = char; using vll = V<ll>; using vpll =V<pair<ll,ll>>; using vst = V<st>; using vdb = V<db>; using vch = V<ch>; #define ...
a.cc: In function 'int main()': a.cc:26:19: error: no matching function for call to 'max(int, ll&)' 26 | #define M(a,b) max(a,b) | ~~~^~~~~ a.cc:88:9: note: in expansion of macro 'M' 88 | cout<<M(1,ans)<<" "; | ^ In file included from /usr/include/c++/14/algorithm:60, ...
s612221669
p03695
C++
#include <iostream> #include <algorithm> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) int main() { int N; cin >> N; int count[9]; REP(i, 9) count[i] = 0; REP(i, N) { int a; cin >> a; ++count[min(a / 400, 8)]; } int min_val = 0, max_val ...
a.cc:40:1: error: expected unqualified-id before numeric constant 40 | 3200以上がいる・いない | ^~~~~~~~~~~~~~~~~~~~~~
s785108567
p03695
C++
#include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < (int)n; i++) #define rfor(i, a, b) for(int i = a; i < (int)b; i++) #define all(ary) (ary).begin(), (ary).end() #define debug(x) cerr << #x << ": " << x << '\n' const long long INF = 1LL << 60; const int MOD = 1000000007; // 1e9 + 7 using namespace std; using...
a.cc: In function 'int main(int, char**)': a.cc:46:14: error: no matching function for call to 'max(ll&, int)' 46 | Min = max(Min, 1); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s885072275
p03695
Java
import java.util.*; public class Main { public static void main(String[] args) throws Exception { // Your code here! Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] colors = new int[9]; while (n-- > 0) { int rate = sc.nextInt(); ...
Main.java:24: error: not a statement min == 1; ^ 1 error
s064277881
p03695
Java
import java.util.*; public class Main { public static void main(String[] args) throws Exception { // Your code here! Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] colors = new int[9]; while (n-- > 0) { int rate = sc.nextInt(); ...
Main.java:25: error: illegal start of type } else { ^ Main.java:29: error: <identifier> expected System.out.println(min + " " + max); ^ Main.java:29: error: <identifier> expected System.out.println(min + " " + max); ^ Main.java:32...
s940287029
p03695
C++
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; bool col[8]=true; int mas=0; int g=0; for(int i=0;i<N;i++){ int a; cin >> a; if(a<400 && col[0]){ mas++; col[0]=false; } else if(a<800 && col[1]){ mas++; col[1]=false; } else if(a...
a.cc: In function 'int main()': a.cc:7:15: error: array must be initialized with a brace-enclosed initializer 7 | bool col[8]=true; | ^~~~ a.cc:45:4: error: expected '}' at end of input 45 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s899512920
p03695
C++
#include <bits/stdc++.h> int num_to_color(int n) { if (n >= 1 && n <= 399) { return 1; } else if (n >= 400 && n <= 799) { return 2; } else if (n >= 800 && n <= 1199) { return 3; } else if (n >= 1200 && n <= 1599) { return 4; } else if (n >= 1600 && n ...
a.cc: In function 'int main()': a.cc:58:13: error: 'color' was not declared in this scope; did you mean 'colors'? 58 | if (color[r] >= 1) { | ^~~~~ | colors a.cc:65:5: error: expected '}' before 'else' 65 | else { | ^~~~ a.cc:62:23: note: to match this '{'...
s340619916
p03695
C++
#include <bits/stdc++.h> #include<algorithm> #include<math.h> using namespace std; template <class T> using V = vector<T>; using ll = long long; using db = double; using st = string; using ch = char; using vll = V<ll>; using vpll =V<pair<ll,ll>>; using vst = V<st>; using vdb = V<db>; using vch = V<ch>; #define ...
a.cc: In function 'int main()': a.cc:87:3: error: expected ',' or ';' before 'll' 87 | ll e=8; | ^~ a.cc:88:11: error: 'e' was not declared in this scope 88 | FOR(i,0,e){ | ^ a.cc:19:40: note: in definition of macro 'FOR' 19 | #define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++) | ...
s954944146
p03695
C++
#include <bits/stdc++.h> #include<algorithm> #include<math.h> using namespace std; template <class T> using V = vector<T>; using ll = long long; using db = double; using st = string; using ch = char; using vll = V<ll>; using vpll =V<pair<ll,ll>>; using vst = V<st>; using vdb = V<db>; using vch = V<ch>; #define ...
a.cc: In function 'int main()': a.cc:19:20: error: expected ',' or ';' before 'for' 19 | #define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++) | ^~~ a.cc:87:3: note: in expansion of macro 'FOR' 87 | FOR(i,0,8){ | ^~~ a.cc:87:7: error: 'i' was not declared in this scope 87 | FOR(i,...
s785338144
p03695
C++
#include"bits/stdc++.h" using namespace std; #define LL long long LL N,M,ans,r,a,col[8]; pair<LL, LL>bc; vector<pair<LL, LL>>BC; int main() { vector<LL> A; cin >> N; for (int i = 0; i < N; i++) { cin >> a; if(a<3200)col[a / 400]++; else r++; } for (int i = 0; i < 8; i++) { if (col[i] > 0)ans++; } ...
a.cc: In function 'int main()': a.cc:23:46: error: expected primary-expression before 'long' 23 | cout<<ans<<" "<<min(ans + r, long long(8))<<endl; | ^~~~
s047175140
p03695
C++
#include"bits/stdc++.h" using namespace std; #define LL long long LL N,M,ans,r,a,col[8]; pair<LL, LL>bc; vector<pair<LL, LL>>BC; int main() { vector<LL> A; cin >> N; for (int i = 0; i < N; i++) { cin >> a; if(a<3200)col[a / 400]++; else r++; } for (int i = 0; i < 8; i++) { if (col[i] > 0)ans++; } ...
a.cc: In function 'int main()': a.cc:3:12: error: expected primary-expression before 'long' 3 | #define LL long long | ^~~~ a.cc:23:46: note: in expansion of macro 'LL' 23 | cout<<ans<<" "<<min(ans + r, LL(8))<<endl; | ^~
s401271952
p03695
C++
#ifdef _DEBUG #include "MyLib.h" #else #define main_C main #include "bits/stdc++.h" #include <regex> #define _USE_MATH_DEFINES #include <math.h> #define FOR(i,s,e) for (int i = int(s); i < int(e); ++i) #define REP(i,e) FOR(i,0,e) //#define INF (INT_MAX/2) #define EPS (1.0e-8) //#define LINF (LLONG_MAX/2) const int MGN ...
a.cc:4:16: error: cannot declare '::main' to be a template 4 | #define main_C main | ^~~~ a.cc:30:5: note: in expansion of macro 'main_C' 30 | int main_C() { | ^~~~~~
s269036473
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,count;cin>>N; vector<int> a(9); for(int i=0;i<N;i++){ cin>>p; if(p<=399)a.at(0)++; else if(p<=799)a.at(1)++; else if(p<=1199)a.at(2)++; else if(p<=1599)a.at(3)++; else if(p<=1999)a.at(4)++; else if(p<=2399)a.at(5)++; el...
a.cc: In function 'int main()': a.cc:7:10: error: 'p' was not declared in this scope 7 | cin>>p; | ^
s299637417
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,count;cin>>N; vector<int> a(9); for(int i=0;i<N;i++){ cin>>p; if(p<=399)a.at(0)++; else if(p<=799)a.at(1)++; else if(p<=1199)a.at(2)++; else if(p<=1599)a.at(3)++; else if(p<=1999)a.at(4)++; else if(p<=2399)a.at(5)++; el...
a.cc: In function 'int main()': a.cc:7:10: error: 'p' was not declared in this scope 7 | cin>>p; | ^ a.cc:20:25: error: no match for 'operator+' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}) ...
s874417693
p03695
C++
#include <bits/stdc++.h> using namespace std; struct Fast { Fast() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20);} } fast; int main() { int n, a, c = 0, gra = 0, br = 0, gre = 0, cy = 0, bl = 0, ye = 0, o = 0, re = 0, sp = 0; cin >> n; for (int i = 0; i < n; i++){ cin...
a.cc: In function 'int main()': a.cc:50:6: error: expected '}' at end of input 50 | } | ^ a.cc:5:12: note: to match this '{' 5 | int main() { | ^
s932624348
p03695
C++
#include<iostream> using namespace std; int main(){ int N,a[100],rank[8]={0,0,0,0,0,0,0,0}; cin >> N; int count=0; for(int i=0;i<N;i++){ cin >> a[i]; for(int j=0;j<8;j++){ if(400*i<=a[i]&&a[i]<400*(i+1)) rank[j]=1 } if(a[i]>3200)count++; } int ans1=0,ans2; for(int i=0;i<8;i++) ans1...
a.cc: In function 'int main()': a.cc:11:48: error: expected ';' before '}' token 11 | if(400*i<=a[i]&&a[i]<400*(i+1)) rank[j]=1 | ^ | ; 12 | } | ~ ...
s237073200
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ map<int,int> mapa; int l=1,r=399; int n,sz=0,rat; cin >> n; for(int i = 0;i<n;i++){ l = 1,r=399; bool f = 0; cin >> rat; for(int j = 1;j<=8;j++){ if(rat>=l and rat <=r){ f = 1; mapa[j]=1; break; } l = 400*j; r =l+399...
a.cc: In function 'int main()': a.cc:30:18: error: no matching function for call to 'max(int, std::map<int, int>::size_type)' 30 | cout<<max(1,mapa.size())<<" "<<min(8,(int)mapa.size()+sz); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from ...
s099261128
p03695
C++
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef lo...
a.cc: In function 'void solve()': a.cc:34:14: error: no matching function for call to 'max(int, std::set<int>::size_type)' 34 | cout << max(1, s.size()) << " " << min(8, s.size() + rainbow) << "\n"; | ~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from a.c...
s976362503
p03695
C++
#include <iostream> #include <vector> using namespace std; typedef long long llt; const int MaxN = 100000 + 5, MaxM = 100000 + 5; int main(){ int n, rate, max; int ncount; cin >> n; vector<int> a(9); for(int i=0;i<n;i++) { cin >> rate; rate = rate/400; if(rate > 7) ...
a.cc: In function 'int main()': a.cc:25:17: error: 'max' cannot be used as a function 25 | ncount = max(1,ncount); | ~~~^~~~~~~~~~
s334515646
p03695
C++
#include <bits/stdc++.h> using namespace std; typedef long long llt; const int MaxN = 100000 + 5, MaxM = 100000 + 5; const llt INF = 0x7F7F7F7F7F7F7F7F; int main(){ int n llt rate; int ncount=0; cin >> n; vector<int> a(8); for(int i=0;i<n;i++) { cin >> rate; rate = rat...
a.cc: In function 'int main()': a.cc:12:5: error: expected initializer before 'llt' 12 | llt rate; | ^~~ a.cc:14:12: error: 'n' was not declared in this scope; did you mean 'yn'? 14 | cin >> n; | ^ | yn a.cc:19:16: error: 'rate' was not declared in this scope ...
s816811588
p03695
C++
#include <bits/stdc++.h> using namespace std; #define lint long long #define P pair<int, int> signed main() { int N; cin >> N; int a[N]; int lis[9] = {}; for(int i = 0; i < N; ++i){ cin >> a[i]; int tmp = a[i] / 400; if(tmp <= 7){ lis[tmp]++; } else { ...
a.cc:31:2: error: stray '#' in program 31 | }#include <bits/stdc++.h> | ^ a.cc:31:3: error: 'include' does not name a type 31 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:37:8: error: redefinition of 'int main()' 37 | signed main() { | ^~~~ a.cc:7:8: note: 'int main()' previously defi...
s371109733
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,c=0,a=0; vector<int> vec(8); cin>>N; vector<int> R(N); for(int i=0;i<N;i++){ cin >> R.at(i); } for(int i=0;i<N;i++){ if(0<R.at(i)&&R.at(i)<400){ vec.at(0)=1; }else if(R.at(i)<800){ vec.at(1)=1; }else if(R....
a.cc: In function 'int main()': a.cc:43:4: error: expected '}' at end of input 43 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s429034983
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,c=0; vector<int> vec(8) cin>>N; vector<int> R(N); for(int i=0;i<N;i++){ cin >> R.at(i); } for(int i=0;i<N;i++){ if(0<R.at(i)&&R.at(i)<400){ vec.at(0)=1; }else if(R.at(i)<800){ vec.at(1)=1; }else if(R.at(i)...
a.cc: In function 'int main()': a.cc:7:3: error: expected ',' or ';' before 'cin' 7 | cin>>N; | ^~~
s451980399
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,c=0; vector<int> vec(8) cin >> N; vector<int> R(N); for(int i=0;i<N;i++){ cin >> R.at(i); } for(int i=0;i<N;i++){ if(0<R.at(i)&&R.at(i)<400){ vec.at(0)=1; }else if(R.at(i)<800){ vec.at(1)=1; }else if(R.at(...
a.cc: In function 'int main()': a.cc:7:3: error: expected ',' or ';' before 'cin' 7 | cin >> N; | ^~~
s571208483
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,c=0; vector<int> vec(8) cin >> N; vector<int> R(N); for(int i=0;i<N;i++){ cin >> R.at(i); } for(int i=0;i<N;i++){ if(0<R.at(i)&&R.at(i)<400){ vec.at(0)=1; }else if(R.at(i)<800){ vec.at(1)=1; }else if(R.at(...
a.cc: In function 'int main()': a.cc:7:3: error: expected ',' or ';' before 'cin' 7 | cin >> N; | ^~~ a.cc:41:4: error: expected '}' at end of input 41 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s773141452
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,c=0; vecter<int> vec(8) cin >> N; vector<int> R(N); for(int i=0;i<N;i++){ cin >> R.at(i); } for(int i=0;i<N;i++){ if(0<R.at(i)&&R.at(i)<400){ vec.at(0)=1; }else if(R.at(i)<800){ vec.at(1)=1; }else if(R.at(...
a.cc: In function 'int main()': a.cc:6:3: error: 'vecter' was not declared in this scope 6 | vecter<int> vec(8) | ^~~~~~ a.cc:6:10: error: expected primary-expression before 'int' 6 | vecter<int> vec(8) | ^~~ a.cc:17:7: error: 'vec' was not declared in this scope 17 | vec.at(...
s952199776
p03695
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; i++) #define repb(i, n) for (int i = (int)n; i >= 0; i--) #define reps(i, m, n) for (int i = (int)m; i < (int)n; i++) #define repsb(i, m, n) for (int i = (int)m; i >= (int)n; i--) #define SORT(v, n) sort(v, v + n); #define VSORT(v) sort(v.begin(), v...
a.cc: In function 'int main(int, const char**)': a.cc:34:16: error: no 'operator++(int)' declared for postfix '++' [-fpermissive] 34 | cnt++; | ~~~^~ a.cc:36:12: error: 'num' was not declared in this scope; did you mean 'enum'? 36 | rep(i, num.size()) | ^~~ a.cc:...
s202182142
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; cin >> N; int R; int C[9]={}; for (int i=0;i<N;i++){ cin >> R; C[R>=3200?8:R/400]++; } int ans=0; for (int i=0;i<8;inti++){ ans+=C[i]>0?1:0; } cout << ans << " " << ans+c[8] << endl; }
a.cc: In function 'int main()': a.cc:14:20: error: 'inti' was not declared in this scope; did you mean 'int'? 14 | for (int i=0;i<8;inti++){ | ^~~~ | int a.cc:17:29: error: 'c' was not declared in this scope 17 | cout << ans << " " << ans+c[8] << endl; |...
s251028539
p03695
C++
#include <vector> #include <cstdio> #include <iostream> #include <cmath> #include <string> #include <cstring> #include <algorithm> #include <numeric> #include <cstdlib> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define REP(i,n) for(int i=0;i<n;i++) #define SORT(...
a.cc: In function 'int main()': a.cc:73:11: error: 'colorsCountm' was not declared in this scope; did you mean 'colorsCount'? 73 | cout << colorsCountm << " " << axAns << endl; | ^~~~~~~~~~~~ | colorsCount a.cc:73:34: error: 'axAns' was not declared in this scope; did you mean 'maxA...
s119306019
p03695
C++
#include<iostream> #include<algorithm> #include<string> #include<vector> #include<cmath> #include<map> #include<iomanip> #include<queue> #include<stack> #include<time.h> //もう二度とつかわん// // ↓ ↓ ↓   // #define ll long long // ↑ ↑ ↑ // //フェルマー方程式の恨み// #define rep(i,n) for(int i=0;i<n;i++) #define ggr getchar(); get...
a.cc: In function 'int main()': a.cc:33:40: error: expected primary-expression before '<' token 33 | if (c == n)cout << 1 << " " << < n << endl; | ^ a.cc:33:44: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary ...
s103508116
p03695
C++
# include<bits/stdc++.h> using namespace std; int main(){ int N; int cnt = 0; int d[9] = {0,0,0,0,0,0,0,0,0}; cin >> N; int a[N]; for(int i = 0;i < N;i++){ cin >> a[i]; } for(int i = 0;i < N;i++){ if((a[i] <= 399) && (a[i] >= 1)) d[0]++; else if((a[i] <= 799) && (a[i] >= 400)) d[1]++; else if...
a.cc: In function 'int main()': a.cc:30:19: error: expected identifier before '(' token 30 | if(d[8] > 0) && (d[8] + cnt <= 9){ | ^ a.cc:34:18: error: expected identifier before '(' token 34 | if(d[8] > 0) && (d[8] + cnt >= 10){ | ^
s651251613
p03695
C++
#include<iostream> #include<algorithm> #include<string> #include<sstream> #include<iomanip> #include<limits> #include<deque> #include<map> #include<list> #include<set> #include <unordered_set> #include<vector> #include<cmath> #include<cstdio> #include<memory> #include<bitset> using namespace std; #define MOD 10000000...
a.cc: In function 'int main()': a.cc:27:9: error: 'memset' was not declared in this scope 27 | memset(ans, 0, sizeof(ans)); | ^~~~~~ a.cc:17:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 16 | #include<bitset> +++ |+#include <cst...
s973910623
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,c,r=0; cin>>n; map<int,int> m; for(int i=0;i<n;++i){ cin>>c; if((c/=400)>=8)r++; else m[c]++; } cout<<max(m.size(),1)<<" "<<m.size()+r<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:12: error: no matching function for call to 'max(std::map<int, int>::size_type, int)' 12 | cout<<max(m.size(),1)<<" "<<m.size()+r<<endl; | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gn...
s092610832
p03695
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const double EPS = 1e-9; const int INF = 1e9; const int MOD = 1e9+7; const ll LINF = 1e18; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<vector<ll>> vll; typedef pair<int, int> pi; typedef pair<ll, ll> pll; typedef map<int, in...
a.cc: In function 'int main()': a.cc:68:9: error: 'm' was not declared in this scope 68 | m = 1; | ^
s607204577
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<int> a(n); for(int i=0; i<n; i++)cin>>a.at(i); set<int> fl; int free=0; for(int i=0; i<n; i++){ if(a.at(i)<400)fl.insert(0); else if(a.at(i)<800)fl.insert(1); else if(a.at(i)<1200)fl.insert(2); else if(a.at(i...
a.cc: In function 'int main()': a.cc:24:12: error: no matching function for call to 'max(std::set<int>::size_type, int)' 24 | cout<<max(fl.size(), 1)<<" "<<fl.size()+free<<endl; | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux...
s935719727
p03695
C++
#include <iostream> #include <string> #include <algorithm> #include <cstdlib> #include <cmath> #include <queue> #include <vector> #include <set> #include <map> #include <numeric> using namespace std; int cnt[8]; int main(){ int n; cin>>n; vector<int> a(n); int r=0; for(int i=0;i<n;i++){ cin>>a[i]...
a.cc:35:2: error: stray '#' in program 35 | }#include <iostream> | ^ a.cc:35:3: error: 'include' does not name a type 35 | }#include <iostream> | ^~~~~~~ a.cc:47:5: error: redefinition of 'int cnt [8]' 47 | int cnt[8]; | ^~~ a.cc:13:5: note: 'int cnt [8]' previously declared here 13...
s049845578
p03695
C++
#include <bits/stdc++.h> #define int long long #define ll long long #define rep(i,n) for(int i=0;i<n;i++) #define INF LLONG_MAX #define eps LDBL_EPSILON #define moder 1000000007 #define pie 3.141592653589793238462643383279 #define P std::pair<int,int> #define prique priority_queue using namespace std; int n,a; set<int>...
a.cc: In function 'int main()': a.cc:22:18: error: no matching function for call to 'max(int, long long int)' 22 | cout<<max(1,(int)st.size())<<" "<<st.size()+ans<<endl; | ~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_...
s368638561
p03695
C++
#include <bits/stdc++.h> #define int long long #define ll long long #define rep(i,n) for(int i=0;i<n;i++) #define INF LLONG_MAX #define eps LDBL_EPSILON #define moder 1000000007 #define pie 3.141592653589793238462643383279 #define P std::pair<int,int> #define prique priority_queue using namespace std; int n,a; set<int>...
a.cc: In function 'int main()': a.cc:22:18: error: no matching function for call to 'max(int, std::set<long long int>::size_type)' 22 | cout<<max(1,st.size())<<" "<<st.size()+ans<<endl; | ~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/i...
s935947496
p03695
C++
#include <iostream> #include <string> #include <utility> #include <algorithm> #include <map> #include <set> #include <vector> #include <cmath> #include <cstdlib> #include <queue> #include <stack> #include <iomanip> using namespace std; #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= ...
a.cc: In function 'int main()': a.cc:38:20: error: no matching function for call to 'max(long long int&, int)' 38 | cout << max(ans,1) << " " << ans + ya<< endl; | ~~~^~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_class...
s282648990
p03695
C++
// https://atcoder.jp/contests/ #include <bits/stdc++.h> #define REP(i, n) for (int(i) = 0; (i) < (n); (i)++) #define REPR(i, n) for (int(i) = (n); (i) >= 0; (i)--) #define FOR(i, m, n) for (int(i) = (m); (i) < (n); i++) #define INF 1e9 #define ALL(v) (v).begin(), (v).end() using namespace std; typedef long long ll; t...
a.cc: In function 'int main()': a.cc:28:33: error: no matching function for call to 'min(long long int, long long unsigned int)' 28 | cout << c.size() << " " << min(8ll, c.size() + mc) << '\n'; | ~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s657431184
p03695
C++
#include <iostream> using namespace std; void f(int c[],int r) { if (r < 400) c[0]++; else if (r < 800) c[1]++; else if (r < 1200) c[2]++; else if (r < 1600) c[3]++; else if (r < 2000) c[4]++; else if (r < 2400) c[5]++; else if (r < 2800) c[6]++; else if (r < 3200) c[7]++; else c[8]++; } int main() { int n, c...
a.cc:32:2: error: '\U0000200b' does not name a type 32 | }​ |
s935753189
p03695
C++
#include <iostream> using namespace std; void f(int c[],int r) { if (r < 400) c[0]++; else if (r < 800) c[1]++; else if (r < 1200) c[2]++; else if (r < 1600) c[3]++; else if (r < 2000) c[4]++; else if (r < 2400) c[5]++; else if (r < 2800) c[6]++; else if (r < 3200) c[7]++; else c[8]++; } int main() { int n, c...
a.cc: In function 'int main()': a.cc:31:18: error: expected '}' at end of input 31 | return 0; | ^ a.cc:14:12: note: to match this '{' 14 | int main() { | ^