submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s878093117
p03695
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n=sc.nextInt(),min=0,max=0,f=0; int[] a=new int[n],color=new int[8]; for(int i=0;i<n;i++){ a[i]=sc.nextInt(); if(a[i]<400&&color[0]==0){ color[0]++; min...
Main.java:62: error: cannot find symbol c--; ^ symbol: variable c location: class Main 1 error
s484785962
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> field(9, 0); for (int i = 0; i<n; i++){ int a; cin >> a; if (a < 3200){ field.at(a/400)++; }else{ field.at(8)++; } } int counter = 0; for ...
a.cc: In function 'int main()': a.cc:36:52: error: expected primary-expression before 'else' 36 | cout << 1 << " " << field.at(8) << else; | ^~~~
s263161184
p03695
C
#include<stdio.h> int main(){ int color[9] = {0}; int n; int min = 0; int max = 0; scanf("%d",&n); int a; for(int i = 0; i < n ; ++i){ scanf("%d",&a); if(a <= 399) color[0] = 1; else if(a <= 799) color[1] = 1; else if(a <= 1199) color[2] = 1; else if(a <= 1599) color[3] = 1; els...
main.c: In function 'main': main.c:30:14: error: expected ';' before '}' token 30 | max = min | ^ | ; 31 | }else{ | ~
s301518788
p03695
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; using namespace std; int main() { int N; cin >> N; vector<int> a(N); int ra[9] = {0}; rep(i, N) { int tmp; cin >> tmp; a[i] = tmp; if (tmp / 400 < 8) { ra[tmp / 400]++; } else ...
a.cc: In function 'int main()': a.cc:33:37: error: expected ';' before ')' token 33 | mini = min(mini, (ra[8])?1:200000)); | ^ | ;
s085777655
p03695
C++
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i ,n) for(int i = 0 ; i < (n) ; i ++ ) #define all(x) (x).begin(),(x).end() using namespace std; using ll = long long; using vin=vector<int>; const int inf=1e9+7; const ll INF=1e18; int main() { int n; cin>>n; vin a(n); rep(i,n) cin>>a[i]; ////////...
a.cc: In function 'int main()': a.cc:42:2: error: expected '}' at end of input 42 | } | ^ a.cc:12:12: note: to match this '{' 12 | int main() { | ^
s501715850
p03695
C++
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i ,n) for(int i = 0 ; i < (n) ; i ++ ) #define all(x) (x).begin(),(x).end() using namespace std; using ll = long long; using vin=vector<int>; const int inf=1e9+7; const ll INF=1e18; int main() { int n; cin>>n; vin a(n); rep(i,n) cin>>a[i]; ////////...
a.cc: In function 'int main()': a.cc:36:3: error: expected primary-expression before '}' token 36 | } | ^ a.cc:42:2: error: expected '}' at end of input 42 | } | ^ a.cc:12:12: note: to match this '{' 12 | int main() { | ^
s434365285
p03695
Java
import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class CheckAll { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int count3200 = 0; Set<Integer> set = new HashSet<>(); for (int i =...
Main.java:5: error: class CheckAll is public, should be declared in a file named CheckAll.java public class CheckAll { ^ 1 error
s678229334
p03695
Java
import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class CheckAll { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int count3200 = 0; Set<Integer> set = new HashSet<>(); for (int i =...
Main.java:5: error: class CheckAll is public, should be declared in a file named CheckAll.java public class CheckAll { ^ 1 error
s583028091
p03695
C++
#include <iostream> #include <string> #include <algorithm> #include <ctime> #include <functional> #include <vector> #include <stack> #include <queue> #include <map> #include <set> #include <cassert> #include <bitset> #include <list> #include <cstdio> #include <stdio.h> #include <string.h> #include <limits.h> #include <...
a.cc: In function 'int main()': a.cc:55:16: error: expected ',' or ';' before ':' token 55 | int ans = 0: | ^ a.cc:56:18: error: 'i' was not declared in this scope 56 | for(int i=0; i<8; i++) if(mp[i] > 0) ans++; | ^
s615777210
p03695
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; using vvl = vector<vector<ll>>; using vl = vector<ll>; #define _GLIBCXX_DEBUG #define acc_io cin.tie(0);ios::sync_with_stdio(false) #define all(x) x.begin(),x.end() #define rep(i,sta,end) for(ll i=sta;i<end;i++) #define lcm(a,b) (a)/__gcd((a),(b))*(b)...
a.cc: In function 'int main()': a.cc:46:16: error: 'min' cannot be used as a function 46 | max=min(8,max); | ~~~^~~~~~~
s280368459
p03695
C++
#include <iostream> using namespace std; int main() { int N; cin >> N; bool colors[8] = {false}; int free = 0; for (int i = 0; i < N; i++) { int a; cin >> a; if (a <= 399) colors[0] = true; else if (a <= 799) colors[1] = true; else if (a <= 1199) colors[2] = true; else if (a <= 159...
a.cc: In function 'int main()': a.cc:26:24: error: expected ';' before 'i' 26 | for (int i = 0; i < 8 i++) { | ^~ | ;
s833080545
p03695
C++
#include <iostream> using namespace std; int main() { int N; cin >> N; bool colors[8] = {false}; int free = 0; for (int i = 0: i < N; i++) { int a; cin >> a; if (a <= 399) colors[0] = true; else if (a <= 799) colors[1] = true; else if (a <= 1199) colors[2] = true; else if (a <= 159...
a.cc: In function 'int main()': a.cc:11:14: error: initializer in range-based 'for' loop 11 | for (int i = 0: i < N; i++) { | ^ a.cc:11:24: error: expected ')' before ';' token 11 | for (int i = 0: i < N; i++) { | ~ ^ | ) a.cc:11:26: e...
s040696429
p03695
C++
#include <iostream> using namespace std; int main() { itn N; cin >> N; bool colors[8] = {false}; int free = 0; for (int i = 0: i < N; i++) { int a; cin >> a; if (a <= 399) colors[0] = true; else if (a <= 799) colors[1] = true; else if (a <= 1199) colors[2] = true; else if (a <= 159...
a.cc: In function 'int main()': a.cc:5:3: error: 'itn' was not declared in this scope; did you mean 'int'? 5 | itn N; | ^~~ | int a.cc:6:10: error: 'N' was not declared in this scope 6 | cin >> N; | ^ a.cc:11:14: error: initializer in range-based 'for' loop 11 | for (int ...
s977519913
p03695
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define rep(i,n) for(int i = 0; i < (int)(n); i++) #define repo(i,n) for(int i = 1; i < (int)(n); i++) #define pb push_back #define np next_permutation #define fi first #define se second #define all(x) (x).b...
a.cc: In function 'int main()': a.cc:55:8: error: expected primary-expression before ';' token 55 | pro==; | ^
s256285456
p03695
C++
#include <bits/stdc++.h> using namespace std; #define all(a)a.begin(),a.end() using ll=long long; const int INF = 1<<30; const ll INFll =1LL<<62; const int mod = int(1e9)+7; using V = vector<ll>; using P = pair<ll,ll>; int main(){ ll n;cin >>n; vector<ll>cnt(9,0); for (int i = 0; i < n; ++i) { ll ...
a.cc: In function 'int main()': a.cc:28:15: error: no matching function for call to 'max(ll&, int)' 28 | cout <<max(mint,1)<<" "<<mint+mx<<endl; | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s236205991
p03695
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define pb push_back #define f(i,n) for(i=0;i<n;i++) #define F(i,a,b) for(i=a;a<=b;i++) #define arr(a,n) for( i=0;i<n;i++)cin>>a[i]; #define fi first #define se second #define mp make_pair #define mod 1000000007 #define YES cout<<"YES...
a.cc: In function 'int main()': a.cc:115:22: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'const char [2]') 115 | cout<<mn<<" "<<mx<endl; | ~~~~~~~~~~~~~~~~~^ | | | std::ba...
s968389776
p03695
C++
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> V(N); for(int i=0;i<N;i++){ cin >> V.at(i); V.at(i)/=400; } vector<int> Clr(9,0); for(int i=0;i<N;i++){ int x=V.at(i); Clr.at(x)++; } int min=0; for(int j=0...
a.cc: In function 'int main()': a.cc:29:9: error: redeclaration of 'int Max' 29 | int Max = min + Clr.at(8); | ^~~ a.cc:25:9: note: 'int Max' previously declared here 25 | int Max=0; | ^~~
s683049911
p03695
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,a,o=0; cin >> n; set<int> b; for(int i = 0;i < n;i++) { cin >> a; if(a / 400 > 7) { o++; } else { b.insert(a / 400); } } int mn = max(1,b.size()); cout << mn << ' ' << b.size() + o << endl; return 0; }
a.cc: In function 'int main()': a.cc:20:21: error: no matching function for call to 'max(int, std::set<int>::size_type)' 20 | int mn = max(1,b.size()); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/b...
s827060614
p03695
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,a,o=0; cin >> n; set<int> b; for(int i = 0;i < n;i++) { cin >> a; if(a / 400 > 7) { o++; } else { s.insert(a / 400); } } int mn = max(1,s.size()); cout << mn << ' ' << s.size() + o << endl; return 0; }
a.cc: In function 'int main()': a.cc:17:25: error: 's' was not declared in this scope 17 | s.insert(a / 400); | ^ a.cc:20:24: error: 's' was not declared in this scope 20 | int mn = max(1,s.size()); | ^
s938338234
p03695
C++
using namespace std; #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i < n; i++) typedef long long ll; int main() { int n; cin >> n; map<int, int> m; for(int i = 0; i < n; i++){ int a; cin >> a; if(a <= 399) m[1]++; else if(a <= 799) m[2]++; else if(a <=...
a.cc: In function 'int main()': a.cc:8:12: error: 'cin' was not declared in this scope 8 | int n; cin >> n; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:...
s032715370
p03695
C++
#include<bits/stdc++.h> using namespace sdt; int main(){ int N; cin>>N; vector<int>a(N); vector<int>mark(9); for(int i=0;i<N;i++){ cin>>a.at(i); int A=a.at(i); if(A/400<8){ if(mark.at(A/400)==0){ mark.at(A/400)=1; } } else{ mark.at(8)=mark.at(8)+1; } } int...
a.cc:2:17: error: 'sdt' is not a namespace-name 2 | using namespace sdt; | ^~~ a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>N; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/...
s572187189
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<int> data(n); for (int i=0;i<n;i++){ cin>>data.at(i); } int c,r; c=0; r=0; for (int k=0;k<=7;k++){ for (int i=0;i<n;i++){ if (400*k<=data.at(i) and data.at(i)<400*(k+1)){ c++; ...
a.cc: In function 'int main()': a.cc:42:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 42 | cout<<min<<" "<<max<<endl; | ~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, from...
s995516081
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<int> data(n); for (int i=0;i<n;i++){ cin>>data.at(i); } int c,r; c=0; r=0; for (int k=0;k<=7;k++){ for (int i=0;i<n;i++){ if (400*k<=data.at(i) and data.at(i)<400*(k+1)){ c++; ...
a.cc: In function 'int main()': a.cc:40:10: error: 'max' cannot be used as a function 40 | min=max(1,c); | ~~~^~~~~
s781455958
p03695
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair<int,int> P; int main(){ int n; cin >> n; map<int,int> mp; int free = 0; rep(i,n) { int a; cin >> a; if (a < 400) mp[0] = 1; else if (a < 8...
a.cc: In function 'int main()': a.cc:27:12: error: expected '}' at end of input 27 | return 0; | ^ a.cc:8:11: note: to match this '{' 8 | int main(){ | ^
s932034827
p03695
C++
#include<iostream> #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #inclu...
a.cc: In function 'int main()': a.cc:31:5: error: expected ')' before '!' token 31 | if(e!<10)c[8]++; | ~ ^ | )
s494399752
p03695
C++
#include<iostream> #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #inclu...
a.cc: In function 'int main()': a.cc:31:5: error: expected ')' before '!' token 31 | if(e!<10)c[9]++; | ~ ^ | )
s185260627
p03695
C++
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) #define all(v) v.begin(), v.end() #define allr(v) v.rbegin(), v.rend() int main() { int n; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; vector<int> color(8, 0);...
a.cc: In function 'int main()': a.cc:33:14: error: no matching function for call to 'max(<unresolved overloaded function type>, int)' 33 | cout << max(min, 1) << endl << mn+m << endl; | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-lin...
s997191058
p03695
C++
#include<bits/stdc++.h> #define all(x) (x).begin(),(x).end() #define rep(i,n) for(ll i=0;i<(ll)(n);i++) using namespace std; typedef long long ll; ll gcd(ll a,ll b){return b!=0?gcd(b,a%b):a;} ll lcm(ll a,ll b){return a*b/gcd(a,b);} int main(){ ll n; cin>>n; ll rate[9]={},a; rep(i,n){ cin>>a; ...
a.cc: In function 'int main()': a.cc:15:17: error: no matching function for call to 'min(ll, int)' 15 | rate[min(a/400,8)]++; | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s084778923
p03695
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; using Graph = vector<vector<int>>; #define rep(i,m,n) for(int i=(int)(m);i<(int)(n);++i) #define rREP(i,m,n) for(int (i)=(n)-1; (i)>=(m);--(i)) #define all(x) (x).begin(),(x).end() #define out(y,x,h,w) (y)<0||(x)<0||(y)>=(h)||(x)>=(w) constexpr int INF ...
a.cc:54:2: error: stray '#' in program 54 | }#include<bits/stdc++.h> | ^ a.cc:54:3: error: 'include' does not name a type 54 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:62:15: error: redefinition of 'constexpr const int INF' 62 | constexpr int INF = 1000000001; | ^~~ a.cc:9:15:...
s420161410
p03695
C++
#include<iostream> #include<string> #include<vector> #include<utility> #include<algorithm> #include<map> #include<cstdlib> #include<cmath> #include<numeric> #include<iomanip> using namespace std; using ll =long long; const int MOD = 1000000007; int main() { ll N; vector<ll>a; cin >> N; ll c; map<ll,ll > value; l...
a.cc: In function 'int main()': a.cc:60:23: error: expected '}' at end of input 60 | cout << color; | ^ a.cc:15:12: note: to match this '{' 15 | int main() { | ^
s230163308
p03695
C++
#include<bits/stdc++.h> #define _GLIBCXX_DEBUG #define rng(i,a,b) for(int i=int(a);i<int(b);i++) #define rep(i,b) rng(i,0,b) #define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--) #define per(i,b) gnr(i,0,b) #define bg begin() #define ed end() #define all(x) x.bg,x.ed #define pb push_back #define pf push_front #define eb...
a.cc: In function 'int main()': a.cc:37:38: error: no matching function for call to 'min(int)' 37 | cout << max(ans, 1) << " " << min(ans+cnt) << endl; | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gn...
s704848059
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N; cin>>N; set<int>S; int a=0; for(int i=0;i<N;i++){ int x; cin>>x; if(1<=x && x<=399) S.insert(1); else if(x<=799) S.insert(2); else if(x<=1199) S.insert(3); else if(x<=1599) S.insert(4); else if(x<=1...
a.cc: In function 'int main()': a.cc:31:16: error: no matching function for call to 'min(std::set<int>::size_type, int)' 31 | } int Min=min(S.size(),1); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++...
s840430836
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N; cin>>N; set<int>S; int a=0; for(int i=0;i<N;i++){ int x; cin>>x; if(1<=x && x<=399) S.insert(1); else if(x<=799) S.insert(2); else if(x<=1199) S.insert(3); else if(x<=1599) S.insert(4); else if(x<=1...
a.cc: In function 'int main()': a.cc:31:16: error: no matching function for call to 'min(std::set<int>::size_type, int)' 31 | } int Min=min(S.size(),1); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++...
s337745324
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N; cin>>N; set<int>S; int a=0; for(int i=0;i<N;i++){ int x; cin>>x; if(1<=x && x<=399) S.insert(1); else if(x<=799) S.insert(2); else if(x<=1199) S.insert(3); else if(x<=1599) S.insert(4); else if(x<=1...
a.cc: In function 'int main()': a.cc:21:11: error: 'i' cannot be used as a function 21 | else i(x<=2399) | ~^~~~~~~~~ a.cc:23:5: error: 'else' without a previous 'if' 23 | else if(x<=2799) | ^~~~ a.cc:31:16: error: no matching function for call to 'min(std::set<int>::size_type, in...
s737284548
p03695
C++
#include <bits/stdc++.h> // #define fi first // #define se second #define rep(i, n) for (ll i=0;i<(n); i++) #define ALL(v) (v).begin(), (v).end() #define FORR(i, a, b) for(int i=(b)-1; i>=(a); --i) template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T> bool chmin(T &...
a.cc: In function 'int main()': a.cc:168:37: error: no matching function for call to 'max(int, const long long int&)' 168 | cout << s.size() - 1 << " " << max(1, min(1LL*8, maxi)) <<endl; | ~~~^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s578831020
p03695
C++
#include<iostream> #include<vector> using namespace std; int main(){ int n; cin >> n; int a[110]; int b[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; for (int i=0; i<n; i++){ cin >> a[i]; b[a[i]/400]++; } int max = 0, min = 0; for (int i=0; i<13; i++){ if (b[i]>0 && i<8){ max++; min++; ...
a.cc: In function 'int main()': a.cc:27:7: error: 'c' was not declared in this scope 27 | if (c==0){ | ^
s381808791
p03695
C++
#include<iostream> #include<vector> using namespace std; int main(){ int n; cin >> n; int a[110]; int b[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0}; for (int i=0; i<n; i++){ cin >> a[i]; b[a[i]/400]++; } int max = 0, min = 0; for (int i=0; i<13; i++){ if (b[i]>0 && i<8){ max++; min++;...
a.cc: In function 'int main()': a.cc:10:43: error: too many initializers for 'int [13]' 10 | int b[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0}; | ^
s960715959
p03695
C++
#include<bits/stdc++.h> using namespace std; #define f(i,a,b) for(int i=(int)(a);i<=(int)(b);i++) #define char_f(i,a) for(int i=(int)(a);(char)s[i]!='\0';i++) #define rf(i,a,b) for(int i=(int)(a);i>=(int)(b);i--) #define llf(i,a,b) for(long long int i=(long long int)(a);i<=(long long int)(b);i++) #define llrf(i,a,b) ...
a.cc: In function 'int main()': a.cc:115:9: error: 'else' without a previous 'if' 115 | else if(m>=1200 && m<=1599) arr[3]++;; | ^~~~ a.cc:116:9: error: 'else' without a previous 'if' 116 | else if(m>=1600 && m<=1999) arr[4]++;; | ^~~~ a.cc:117:9: error: 'else' without a ...
s125323949
p03695
C++
#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; int main(){ ll n; cin >> n; vector<int>a(n, 0);...
a.cc: In function 'int main()': a.cc:33:40: error: no matching function for call to 'min(int, ll&)' 33 | cout << max(minct, 1) << " " << min(minct + redct, n) << endl; | ~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /...
s768626262
p03695
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0; i<(n); i++) template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } int main()...
a.cc: In function 'int main()': a.cc:12:14: error: no matching function for call to 'chmin(ll&, int)' 12 | chmin(a, 3599); | ~~~~~^~~~~~~~~ a.cc:5:31: note: candidate: 'template<class T> bool chmin(T&, T)' 5 | template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true;...
s872690001
p03695
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0;i<n;i++) using ll = long long; using P = pair<ll,ll>; int main(){ int n;cin>>n; vector<int> v(n); rep(i,n){ cin>>v.at(i); } vector<int> color(8,0); int other=0; rep(i,n){ if (0<=v.at(i) && v.at(i) <= 399){ color.at...
a.cc: In function 'int main()': a.cc:57:3: error: expected '}' before 'else' 57 | else { | ^~~~ a.cc:50:18: note: to match this '{' 50 | if (sum<=other){ | ^
s283117925
p03695
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<list> #include<map> #include<deque> #include<cctype> #include<math.h> using namespace std; #define ll long long int main(){ ll N; cin >> N; ll i,a; ll color[8],t1=0,t2=0; ...
a.cc: In function 'int main()': a.cc:30:16: error: no matching function for call to 'max(long long int&, int)' 30 | cout << max(t1,1) <<" "<< t1+t2 <<endl; | ~~~^~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s939942960
p03695
C++
n = int(input()) a = list(map(int,input().split())) color_n = [0 for i in range(9)] for i in a: if 1 <= i <= 399: color_n[0] += 1 elif 400 <= i <= 799: color_n[1] += 1 elif 800 <= i <= 1199: color_n[2] += 1 elif 1200 <= i <= 1599: color_n[3] += 1 ...
a.cc:1:1: error: 'n' does not name a type 1 | n = int(input()) | ^
s336877655
p03695
C
#include<stdio.h> int main(){ int i,N; int a[4801]; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d",&a[i]); } int r[100]={0}; int num=0; for(i=0;i<N;i++){ if(a[i]<400){ r[i]=1; } else if(a[i]>=400&&a[i]<800){ r[i]=2; } else if(a[i]>=800&&a[i]<1200){ r[i]=3; } ...
main.c: In function 'main': main.c:62:10: error: expected '(' before '{' token 62 | else if{ | ^ | (
s139746311
p03695
C++
#include<bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using ull = unsigned long long; int main(){ ll n; cin >> n; vector<ll> a(n); rep(i,n) cin >> a.at(i); vector<ll> f(8); ll x = 0; for(int i=0;i<n;i++){ if(a.at(i) < 400 ) f.at(0) = ...
a.cc: In function 'int main()': a.cc:27:14: error: no matching function for call to 'max(ll&, int)' 27 | cout << max(ans,1) << " " << ans+x << endl; | ~~~^~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s022123320
p03695
C++
#include <iostream> #include <vector> int main(){ int n,ans,a,tmp; cin >> n; vector<int> col(9); for(int i=0;i < n;i++){ cin >> tmp; col[tmp / 400] += 1; } for(int i = 0;i < 9;i++){ if (i != 8) ans += col[i] cout << ans << " "; if (i == 8) ans += col[i] cout << ans << endl; } ...
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> n; | ^~~ | 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; ///< Linked to sta...
s514900745
p03695
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(int argc, char **argv) { int n; cin >> n; set<int> s; int over_num{0}; for (int i = 0; i < n; ++i) { int a; cin >> a; if (a >= 3200) ++over_num; else { s.insert(a/400); } } int max{0}, min{0}; max = static_cast<int>...
a.cc: In function 'int main(int, char**)': a.cc:27:39: error: expected '(' before 's' 27 | min = static_cast<int>s.size(); | ^ | ( a.cc:27:47: error: expected ')' before ';' token 27 | min = sta...
s090471955
p03695
C++
#include <bits/stdc++.h> using namespace std; //#define rep(i,n) for (int i=0;i<(n);++i) int main(){ //srandom((unsigned long)time(NULL)); int n; cin>>n; //vector<int> a; vector<int> cont; for(int i=0;i<9;i++){ cont.emplace_back(0); } for(int i=0;i<n;i++){ int x; cin>>x; if(x<400)cont[0]++; if(40...
a.cc: In function 'int main()': a.cc:35:8: error: 'cnt' was not declared in this scope; did you mean 'cont'? 35 | mx=ans+cnt[8]; | ^~~ | cont
s092256569
p03695
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, b = 0; cin >> N; vector<int> a(8, 0); for (int i = 0; i < N; i++) { int c, check = 0; cin >> c; for (int j = 0; j < 8; j++) { if (c < 400*(j + 1) && check == 0) { a.at(j) = 1; check = 1; } } if (c ...
a.cc: In function 'int main()': a.cc:25:36: error: no matching function for call to 'min(int)' 25 | cout << max(ans, 1) << " " << min(ans + b) << endl; | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c+...
s523244527
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int rate[9]; for(int i = 0; i < 9; i++){ rate[i] = 0; } int n; cin >> n; for(int i = 0; i < n; i++){ int a; cin >> a; if(a/400 < 9){ rate[a/400]++; } else{ rare[8]++; } } int min_num = 0; for(int i = 0;...
a.cc: In function 'int main()': a.cc:18:7: error: 'rare' was not declared in this scope; did you mean 'rate'? 18 | rare[8]++; | ^~~~ | rate
s866803655
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[i]; map<int, int> p; int m = 0; for (int i = 0; i < n; i++) { if (a[i] >= 1 && a[i] <= 399) p[0]++; if (a[i] >= 400 && a[i] <= 799) p[1]++; if (a[i] >= 800 && ...
a.cc: In function 'int main()': a.cc:26:14: error: no matching function for call to 'max(int, std::map<int, int>::size_type)' 26 | cout << max(1, p.size()) << " " << p.size() + m << endl; | ~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x...
s584478601
p03695
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define dunk(n) cout << n << endl #define all(a) (a).begin(),(a).end() int main() { int n; cin >> n; vector<int> rate(n),color = {0,0,0,0,0,0,0,0}; rep(i,n) cin >> rate[i]; sort(...
a.cc:31:1: error: expected declaration before '}' token 31 | } | ^
s569993095
p03695
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define dunk(n) cout << n << endl #define all(a) (a).begin(),(a).end() int main() { int n; cin >> n; vector<int> rate(n),color(8) = {0,0,0,0,0,0,0,0}; rep(i,n) cin >> rate[i]; so...
a.cc: In function 'int main()': a.cc:10:34: error: expected ',' or ';' before '=' token 10 | vector<int> rate(n),color(8) = {0,0,0,0,0,0,0,0}; | ^ a.cc:19:33: error: 'coler' was not declared in this scope; did you mean 'color'? 19 | else if(rate[i] < 2000) coler[...
s806482651
p03695
C++
package main import ( "bufio" "fmt" "os" "sort" "strconv" ) const ( A = iota B C D E F G H I ) func operate(x int) int { if x < 400 { return A } else if x < 800 { return B } else if x < 1200 { return C } else if x < 1600 { return D } else if x < 2000 { return E } else if x < 2400 { re...
a.cc:1:1: error: 'package' does not name a type 1 | package main | ^~~~~~~ a.cc:45:1: error: 'func' does not name a type 45 | func main() { | ^~~~
s821771072
p03695
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ll long long #define INF 1000000000000000000 int main(){ int N; cin >> N; vector<int> A(N); vector<int> B(9, 0); rep(i, N){ cin >> A[i]; if (A[i] <= 399) B[0] = 1; else if (A[i] <= 799) B[1]...
a.cc: In function 'int main()': a.cc:33:41: error: expected '}' at end of input 33 | cout << min_sum << " " << sum << endl; | ^ a.cc:7:11: note: to match this '{' 7 | int main(){ | ^
s480661735
p03695
C++
#define _GLIBCXX_DEBUG #define rep(i,n) for(int i=0;i<n;i++) #include <bits/stdc++.h> #include <numeric> using namespace std; typedef long long ll; const int mod= 1e+9+7; int main() { int N; cin>>N; vector<int>a(N); bitset<8>b; int cnt=0; rep(i,N){ cin>>a[i]; if(a[i]>=3200){ ...
a.cc: In function 'int main()': a.cc:23:13: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'const char [2]') 23 | cout<<bb<" "; | ~~~~~~~~^~~~ | | | | | const char [2] | std::basic_ostream<char> In file included from /us...
s516583772
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; map<string,int> mp; int others=0; for(int i=0;i<n;++i){ int a; cin >> a; if(1<= a && a<= 399) mp[gray]++; else if(400<= a && a <= 799) mp[brown]++; else if(800<= a && a <= 1199) mp[green]++; ...
a.cc: In function 'int main()': a.cc:10:33: error: 'gray' was not declared in this scope 10 | if(1<= a && a<= 399) mp[gray]++; | ^~~~ a.cc:11:41: error: 'brown' was not declared in this scope 11 | else if(400<= a && a <= 799) mp[brown]++; | ...
s145936047
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(void) { int N; cin >> N; bitset<8> C; int O = 0; for (int i = 0; i < N; i++) { int score; cin >> score; if (score < 400) C.set(0); else if (score < 800) C.set(1); else if (score < 1200) C.set(2); else if (score < 1600) C.set(3);...
a.cc: In function 'int main()': a.cc:37:21: error: no matching function for call to 'max(int, std::size_t)' 37 | int mn = max(1, C.count()); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc+...
s198510932
p03695
C
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> int main(void){ int num_attendance; int *rate; int kinds_color=0; int class[9]={0}; scanf("%d",&num_attendance); rate=(int *)malloc(sizeof(int)*num_attendance); int i; for(i=0;i<num_attendance;i++){ scanf("...
main.c: In function 'main': main.c:40:30: error: expected ')' before '{' token 40 | else if(3200<=rate[i]{ | ~ ^ | ) main.c:43:5: error: expected expression before '}' token 43 | } | ^
s336575800
p03695
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; int main(){ int n; cin>>n; int free; vector<int> a(n),rate(8); rep(i,n){ int tmp = 0; cin >> tmp; if(tmp>=3200)free++; else if(tmp>=2800)rate.at(7)++; else if(tmp>=240...
a.cc: In function 'int main()': a.cc:31:20: error: expected primary-expression before '<<' token 31 | cout<<max(ans,1);<<" "<<ans+free<<endl; | ^~
s420044739
p03695
C++
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> #define PI 3.14159265359 using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) const int INF= 1e9+5; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll> >vvl; typedef pair<ll,ll> P; typedef tuple<ll,ll,ll> T; const ll MOD=1000000007L...
a.cc: In function 'int main()': a.cc:28:27: error: no matching function for call to 'min(int, ll)' 28 | cout<<S.size()<<" "<<min(8,k+count)<<endl; | ~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/st...
s402039975
p03695
C++
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> #define PI 3.14159265359 using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) const int INF= 1e9+5; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll> >vvl; typedef pair<ll,ll> P; typedef tuple<ll,ll,ll> T; const ll MOD=1000000007L...
a.cc: In function 'int main()': a.cc:27:27: error: no matching function for call to 'min(int, long long unsigned int)' 27 | cout<<S.size()<<" "<<min(8,S.size()+count)<<endl; | ~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/inclu...
s147317373
p03695
Java
あimport java.util.Scanner; public class Main { static int n; static int[] dp; public static void main(String[] args) { Scanner sc = new Scanner(System.in); n = sc.nextInt(); dp = new int[8]; //0:灰色~7:赤 int over = 0; int ans = 0; for (int i = 0; i < n; i++) ...
Main.java:1: error: class, interface, enum, or record expected ?import java.util.Scanner; ^ 1 error
s253268675
p03695
C++
#include <math.h> #include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> r(n); for(int i = 0; i < n; i++){ cin >> r.at(i); } vector<int> c(9); for(int i = 0; i < n; i++){ if(r.at(i) <= 3199){ c.at(r.at(i)/400) = c.at(r.at(i)/400)+1...
a.cc: In function 'int main()': a.cc:26:55: error: expected ';' before ')' token 26 | cout << max(count,c.at(8)) << " " << count+c.at(8)); | ^ | ;
s321305799
p03695
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for(ll i = 0; i < (ll)(n); i++) #define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++) #define memi cout << endl #define kono(n) cout << fixed << setprecision(n) #define all(c) (c).begin(), (c).end() #define pb push_back #define hina c...
a.cc: In function 'int main()': a.cc:51:12: error: no matching function for call to 'min(ll)' 51 | out(min(a + b + c + d + e + f + g + h + k)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:14:24: note: in definition of macro 'out' 14 | #define out(n) cout << n | ^ I...
s892242133
p03695
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for(ll i = 0; i < (ll)(n); i++) #define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++) #define memi cout << endl #define kono(n) cout << fixed << setprecision(n) #define all(c) (c).begin(), (c).end() #define pb push_back #define hina c...
a.cc: In function 'int main()': a.cc:18:10: error: 'b' was not declared in this scope 18 | ll a = b = c = d = e = f = g = h = k = n = m = 0; | ^ a.cc:18:14: error: 'c' was not declared in this scope 18 | ll a = b = c = d = e = f = g = h = k = n = m = 0; | ^ a.cc:18:18: error:...
s076939591
p03695
C++
#include <bits/stdc++.h> #define rep(i,m,n) for(int i=m;i<n;i++) #define fix(n) cout<<fixed<<setprecision(n) #define co(n) cout<<n<<endl #define all(n) (n).begin(),(n).end() using namespace std; typedef long long ll; const ll mod=1000000007; double pi=3.1415926535; int main(){ int n; cin>>n; int a,b,c=0,ans=0,x[...
a.cc: In function 'int main()': a.cc:21:6: error: 'ams' was not declared in this scope; did you mean 'ans'? 21 | if(ams>0) cout<<ans<<" "; | ^~~ | ans
s233663031
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,P,G=0;cin>>N; vector<bool>C(8,false); for(int i=0;i<N;i++){ cin>>P; if(P<400)C.at(0)=true; else if(P<800)C.at(1)=true; else if(P<1200)C.at(2)=true; else if(P<1600)C.at(3)=true; else if(P<2000)C.at(4)=true; else if(P<2400)C...
a.cc: In function 'int main()': a.cc:18:12: error: no matching function for call to 'min(std::__iterator_traits<std::_Bit_iterator, void>::difference_type, int)' 18 | cout<<min(count(C.begin(),C.end(),true)+G,8)<<endl; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14...
s350758278
p03695
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define MOD 1000000007 typedef long long int ll; const ll INF=(ll)1e18; //const int INF=(1<<30); int main(){ int N; cin >> N; map<int,int> mp; int cnt=0; REP(i,N){ int a; cin ...
a.cc: In function 'int main()': a.cc:31:14: error: no matching function for call to 'min(int, std::map<int, int>::size_type)' 31 | cout << min(1,mp.size()) << " " << min((int)mp.size()+cnt, 8) << endl; | ~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from ...
s439116315
p03695
C++
#include <bits/stdc++.h> #define all(v) v.begin(), v.end() #define mp make_pair #define EPS (int)1e-9 #define PI acos(-1) #define endl '\n' #define pb push_back #define fi first #define se second using namespace std; using ld = long double; using ll = long long; using vi = vector<int>; using pii = pair<int, int>; co...
a.cc: In function 'int main()': a.cc:34:20: error: 'inRange' was not declared in this scope 34 | if(inRange(x, 1, 399) and !color[0]) | ^~~~~~~ a.cc:40:20: error: 'inRange' was not declared in this scope 40 | if(inRange(x, 400, 799) and !color[1]) | ...
s389396553
p03695
C++
package main import ( "bufio" "fmt" "os" "strconv" ) func out(x ...interface{}) { fmt.Println(x...) } var sc = bufio.NewScanner(os.Stdin) func getInt() int { sc.Scan() i, e := strconv.Atoi(sc.Text()) if e != nil { panic(e) } return i } func getString() string { sc.Scan() return sc.Text() } func main...
a.cc:1:1: error: 'package' does not name a type 1 | package main | ^~~~~~~ a.cc:10:26: error: expected unqualified-id before ')' token 10 | func out(x ...interface{}) { | ^ a.cc:14:1: error: 'var' does not name a type 14 | var sc = bufio.NewScanner(os.Stdin) | ^~~ a....
s495833495
p03695
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) #define FOR(i,start,end) for(int i=start;i<=end;i++) const int INF = 1001001001; typedef long long ll; const ll MOD=1000000007; using namespace std; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class ...
a.cc: In function 'int main()': a.cc:44:5: error: 'else' without a previous 'if' 44 | else cout << counter << " "; | ^~~~
s761587292
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,a; int free=0,color=0; map<int,bool> m; cin>>N; for(int i=0;i<N;i++){ cin>>a; a<3200?m[a/400]=true:m[3200]=true; if(a/400>=8){ free++; } } for(auto itr=m.begin();itr!=m.end();itr++)color++; if(free!=0)color--; colo...
a.cc: In function 'int main()': a.cc:19:34: error: expected ':' before ';' token 19 | ((color+free>8)?cout<<"8"<<endl;:cout<<color+free<<endl; | ^ | : a.cc:19:34: error: expected primary-expression before ';' token a.cc:19:34: error: exp...
s380274643
p03695
C++
#include <iostream> #include <iomanip> #include <vector> #include <utility> #include <map> #include <algorithm> #include <queue> #include <cmath> #include <numeric> #include <set> using namespace std; struct aaa{aaa(){cin.tie(nullptr); ios::sync_with_stdio(false); cout<<fixed<<setprecision(20);};}aaa; template <class ...
a.cc: In function 'int main()': a.cc:34:5: error: expected ',' or ';' before 'if' 34 | if (mp[8]) maxa = min(7, mpn + mp[8] - 1); | ^~
s837171194
p03695
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> using namespace std; int main() { int N; cin >> N; vector<int> a(N); for (auto& x : a) { cin >> x; } set<int> s; int t = 0; for (auto x : a) { if (x < 3200) { s.insert(x / 400); } else { ++t; } } cout << max(1u, s.si...
a.cc: In function 'int main()': a.cc:28:20: error: no matching function for call to 'max(unsigned int, std::set<int>::size_type)' 28 | cout << max(1u, s.size()) << " " << s.size() + t << endl; | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from...
s835966473
p03695
C++
#include <iostream> // cout, endl, cin #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #include <cstdint> // int64_t, int*_t #include <cstd...
a.cc: In function 'int main()': a.cc:59:42: error: expected ')' before ';' token 59 | (color.at(rate.at(j) / 400)++; | ~ ^ | )
s860867533
p03695
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> a(n); int i; int count,count_all=0,0; vector<int> b(8); for(i=0;i<8;i++){ b[i] = 0; } for(i=0;i<n;i++){ cin >> a[i]; } sort(a.begin(), a.end()); for(i=0;i<n;i++){ if(a[i]<=399&&b[0]==0){ cou...
a.cc: In function 'int main()': a.cc:9:25: error: expected unqualified-id before numeric constant 9 | int count,count_all=0,0; | ^
s861402952
p03695
C++
#include <iostream> #include <vector> int main(){ int n; std::cin >> n; std::vector<int> list(9, 0); for(int i = 0; i < n; ++i){ int val; std::cin >> val; if(val / 400 < 8){ ++list.at(val / 400); }else{ ++list.at(8; } } int min =...
a.cc: In function 'int main()': a.cc:15:24: error: expected ')' before ';' token 15 | ++list.at(8; | ~ ^ | ) a.cc:19:20: error: 'count_if' is not a member of 'std' 19 | int min = std::count_if(list.begin(), list.begin() + 8, [](auto i){ ...
s256844394
p03695
C++
#include <iostream> #include <set> #include <queue> #include <vector> #include <algorithm> #include <math.h> #include <cmath> #include <string> #include <climits> #include <sstream> #include <iomanip> #include <map> #include <stack> #include <tuple> #include <numeric> #include <functional> #include <unordered_map> usi...
a.cc: In function 'int main()': a.cc:67:13: error: redeclaration of 'int ansMax' 67 | int ansMax = min(ansMax, 8); | ^~~~~~ a.cc:66:13: note: 'int ansMax' previously declared here 66 | int ansMax = ans + col[8]; | ^~~~~~
s155525553
p03695
C++
// Created by conan1024hao in 2019. // Copyright © 2019 conan1024hao. All rights reserved. // 専用ライブラリです、自由にコピーして構いません。 // 感谢看我的代码!Wechat:conan1024hao QQ:810396815 #pragma GCC optimize ("O3") #include <iostream> #include <iomanip> #include <istream> #include <ostream> #include <sstream> #include <iterator> #include ...
a.cc: In function 'int main()': a.cc:93:23: error: 'c' was not declared in this scope; did you mean 'cc'? 93 | cout<<1<<" "<<c<<endl; | ^ | cc
s244425214
p03695
C++
#include <bits/stdc++.h> using namespace std; #define int long long int int32_t main(){ int n,m;cin>>n;m=n; int high=0; int gray=0; int brown=0; int green=0; int cyan=0; int blue=0; int yellow=0; int orange=0; int red=0; while(m--){ int tmp;cin>>tmp; if(tmp<400) gray++; else if(tmp<800) brown++; else...
a.cc: In function 'int32_t main()': a.cc:28:18: error: no matching function for call to 'max(long long int&, int)' 28 | cout<<max(a1,1)<<" "<<a1+high; | ~~~^~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++...
s593333162
p03695
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); boolean glay = false; boolean blown = false; boolean green = false; boolean sky = false; boolean blue = false; boolean yellow = false; boolean orange ...
Main.java:44: error: cannot find symbol System.println(anslow+" "+anshigh); ^ symbol: method println(String) location: class System 1 error
s198666892
p03695
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); boolean glay = false; boolean blown = false; boolean green = false; boolean sky = false; boolean blue = false; boolean yellow = false; boolean orange ...
Main.java:41: error: ';' expected int anshigh =0 ^ 1 error
s977025566
p03695
C++
#include <iostream> #include <cmath> #include <algorithm> using namespace std; int main(){ int n, i, c[9], k, ans=0; cin >> n; int a[n]; for(i=0; i<9; i++) c[i]=0; for(i=0; i<n; i++){ cin >> a[i]; k=a[i]/400; c[i]++; } sort(a, a+n); for(i=0; i<8; i++){ if(c[i]>0) ans++; } c...
a.cc: In function 'int main()': a.cc:21:50: error: expected '}' at end of input 21 | cout << max(ans, 1) << " " << max(ans+c[8], 8); | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s213478224
p03695
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; int main() { int n; cin >> n; vector<int> a(n), cl(9, 0); for (int i = 0; i < n; i++) { cin >> a.at(i); if (0 < a.at(i) && a.at(i) < 400) cl.at(0) = 1; else if (400 <= a.at(i) && a.at(i) < 800) c...
a.cc: In function 'int main()': a.cc:32:24: error: no matching function for call to 'max(int, std::basic_ostream<char>&)' 32 | if (cl.at(8) > 0) max(1, cout << sum - cl.at(8)) << " "; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s307052454
p03695
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<map> #include<math.h> #include<iomanip> #include<set> #include<numeric> #include<cstring> #include<cstdio> #include<functional> #include<bitset> #include<limits.h> #include<cassert> #include<iterator> #include<complex> #in...
a.cc: In function 'int main()': a.cc:83:20: error: no matching function for call to 'min(__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type, int)' 83 | cout << min(8 - (upper(cl, 0) - lower(cl, 0)) + R, 8) << endl; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In f...
s839132736
p03695
C
#include<stdio.h> int main(void){ int num=0; int a[num]; int result=0; int resultmin=0; int red=0; int blue=0; int yellow=0; int green=0; int grly=0; int softblue=0; int orange=0; int blown=0; scanf("%d",&num); for(int i=0;i<num;i++){ scanf("%d",&a[i]); if(a[i]<399){ ...
main.c: In function 'main': main.c:86:38: error: expected ';' before '}' token 86 | printf("%d",resultmin,result) | ^ | ; 87 | } | ~
s145627485
p03695
C
#include<stdio.h> int main(void){ int num=0; int a[num]; int result=0; int resultmin=0; int red=0; int blue=0; int yellow=0; int green=0; int grly=0; int softblue=0; int orange=0; int blown=0; scanf("%d",&num); for(int i=0;i<num;i++){ scanf("%d",a[i]); if(a[i]<399){ ...
main.c: In function 'main': main.c:86:38: error: expected ';' before '}' token 86 | printf("%d",resultmin,result) | ^ | ; 87 | } | ~
s897370980
p03695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int a[n]; int i; int color[9]={}; for(i=0;i<n;i++){ cin >> a[i]; if(a[i]<3200)color[a[i]/400]++; else color[8]++; } int cnt = 0; for(i=0;i<=7;i++){ if(color[i]>0) cnt++; } int max = min(8,cnt+color[8]); i...
a.cc: In function 'int main()': a.cc:19:16: error: 'max' cannot be used as a function 19 | int min = max(1,cnt); | ~~~^~~~~~~
s538343090
p03695
C++
#include <bits/stdc++.h> using namespace std; const int N=1e5+5; #define inf 0x3f3f3f3f #define ll long long int a[N],b[10]; int main() { int n; cin>>n; for(int i=1;i<=n;i++) { cin>>a[i]; if(a[i]<400) { b[1]++; } else if(a[i]<800) { b[2]++; } else if(a[i]<1200) { b[3]++; } else if(a[...
a.cc: In function 'int main()': a.cc:39:25: error: 'cnt' was not declared in this scope; did you mean 'int'? 39 | cnt++; | ^~~ | int a.cc:46:31: error: 'cnt' was not declared in this scope; did you mean 'int'? 46 | ...
s269573791
p03695
C++
//#define NDEBUG #include <algorithm> #include <cstddef> #include <cstdint> #include <iostream> #include <vector> namespace n91 { using i8 = std::int_fast8_t; using i32 = std::int_fast32_t; using i64 = std::int_fast64_t; using u8 = std::uint_fast8_t; using u32 = std::uint_fast32_t; using u64 = std::uint_fast64_t; usi...
a.cc: In function 'void n91::main_()': a.cc:89:19: error: 'struct std::array<long unsigned int, 8>' has no member named 'beign'; did you mean 'begin'? 89 | std::fill(count.beign(), count.end(), static_cast<usize>(0)); | ^~~~~ | begin
s650709409
p03695
C++
//#define NDEBUG #include <algorithm> #include <cstddef> #include <cstdint> #include <iostream> #include <vector> namespace n91 { using i8 = std::int_fast8_t; using i32 = std::int_fast32_t; using i64 = std::int_fast64_t; using u8 = std::uint_fast8_t; using u32 = std::uint_fast32_t; using u64 = std::uint_fast64_t; usi...
a.cc: In function 'void n91::main_()': a.cc:89:19: error: 'struct std::array<long unsigned int, 8>' has no member named 'beign'; did you mean 'begin'? 89 | std::fill(count.beign(), count.end(), static_cast<usize>(0)); | ^~~~~ | begin a.cc:104:24: error: no matching f...
s399612119
p03695
C++
#include<iostream> #include<set> #include<vector> #include<string> #include<algorithm> int main(){ int n; std::cin >> n; std::vector<int> a(n); for(int i = 0; i < n; i++){ std::cin >> a.at(i); } std::set<std::string> S; int free = 0; for(int i = 0; i < n; i++){ if(1 <...
a.cc: In function 'int main()': a.cc:55:9: error: redeclaration of 'int maxN' 55 | int maxN = minN + free; | ^~~~ a.cc:50:9: note: 'int maxN' previously declared here 50 | int maxN; | ^~~~
s751794795
p03695
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(a) (a).begin(),(a).end() #define SUM(a) accumulate((a).begin(),(a).end(),0) #define SORT(a) sort(ALL(a)) #define REV(a) reverse(ALL(a)) #define dump(x) cerr << #x << " = " << (x) << endl...
a.cc: In function 'int main()': a.cc:39:14: error: no matching function for call to 'min(int)' 39 | cout << min(sm+cnt[8]) << endl; | ~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s108736559
p03695
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(a) (a).begin(),(a).end() #define SUM(a) accumulate((a).begin(),(a).end(),0) #define SORT(a) sort(ALL(a)) #define REV(a) reverse(ALL(a)) #define dump(x) cerr << #x << " = " << (x) << endl...
a.cc: In function 'int main()': a.cc:31:15: error: expected ';' before '}' token 31 | cnt[8] | ^ | ; 32 | }else{ | ~
s332833893
p03695
C
#include <stdio.h> int main() { int n,a[100],color[8] = 0; scanf("%d",&n); for (int i = 0; i < n; i++) { scanf("%d",&a[i]); color[a[i] / 400] ++; } int max = 0,min = 101; for (int i = 0; i < 8; i++) { if(max < color[i])max = color[i]; if(min > color[i]...
main.c: In function 'main': main.c:5:29: error: invalid initializer 5 | int n,a[100],color[8] = 0; | ^
s094498260
p03695
C++
#include <cstdio> #include <iostream> #include <vector> #include <algorithm> #include <unordered_set> #include <climits> using Set = std::unordered_set<uint32_t>; void FindAndUpdate(int key, Set* o) { auto find = o->find(key); if (find == o->end()) { o->insert(key); } } int main() { uint32_t n = 0; sc...
a.cc:9:32: error: 'uint32_t' was not declared in this scope 9 | using Set = std::unordered_set<uint32_t>; | ^~~~~~~~ a.cc:8:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 7 | #include <climits> +++ |+#include <...
s911497261
p03695
C++
#include <cstdio> #include <iostream> #include <vector> #include <algorithm> #include <unordered_set> #include <climits> using Set = std::unordered_set<uint32_t>; void FindAndUpdate(int key, Set* o) { auto find = o->find(key); if (find == o->end()) { o->insert(key); } } int main() { uint32_t n = 0; sc...
a.cc:9:32: error: 'uint32_t' was not declared in this scope 9 | using Set = std::unordered_set<uint32_t>; | ^~~~~~~~ a.cc:8:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 7 | #include <climits> +++ |+#include <...
s825224352
p03695
C++
#include<bits/stdc++.h> #include<bitset> using namespace std; #define M 1000000007 #define pb push_back #define f first #define s second #define rep(i, st, ed) for(int i=st; i<ed; i++) #define repn(i, st, ed) for(int i=st; i<=ed; i++) #define repb(i, ed, st) for(int i=ed; i>=st; i--) typedef long long ll; typedef un...
a.cc: In function 'int main()': a.cc:151:5: error: 'a' was not declared in this scope 151 | a = arr[i]; | ^ a.cc: In function 'll fxor(ll)': a.cc:64:1: warning: control reaches end of non-void function [-Wreturn-type] 64 | } | ^
s200069600
p03695
C++
#include<bits/stdc++.h> #include<bitset> using namespace std; #define M 1000000007 #define pb push_back #define f first #define s second #define rep(i, st, ed) for(int i=st; i<ed; i++) #define repn(i, st, ed) for(int i=st; i<=ed; i++) #define repb(i, ed, st) for(int i=ed; i>=st; i--) typedef long long ll; typedef un...
a.cc: In function 'int main()': a.cc:151:5: error: 'a' was not declared in this scope 151 | a = arr[i]; | ^ a.cc: In function 'll fxor(ll)': a.cc:64:1: warning: control reaches end of non-void function [-Wreturn-type] 64 | } | ^