submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s527507114 | p03694 | Java | public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int n = Integer.parseInt(scan.next());
int[] a = new int[n];
for(int i=0;i<n;i++){
a[i] = Integer.parseInt(scan.next());
}
Arrays.sort(a);
System.out.println(a[n-1]-a[0]);
}
}
| Main.java:3: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:9: error: cannot find sym... |
s458297675 | p03694 | Java | import java.util.Scanner;
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
import static java.lang.Math.*;
public class main implements Runnable{
static ArrayList <Integer> adj[];
static int co=0,f=0;
static void Check2(int n){
adj=new ArrayList[n+1];
for(int ... | Main.java:8: error: class main is public, should be declared in a file named main.java
public class main implements Runnable{
^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
|
s459972615 | p03694 | C++ | #include<stdio.h>
int max_main(int,int);
int main()
{
int a[100];
int i,n,t;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
t=max_main(a,n);
printf("%d",t);
return 0;
}
int max_main(int a[],int n)
{
int max,min,m;
max=min=a[0];
for(i=0;i<n;i++)
{
if(a[i]>max)... | a.cc: In function 'int main()':
a.cc:10:16: error: invalid conversion from 'int*' to 'int' [-fpermissive]
10 | t=max_main(a,n);
| ^
| |
| int*
a.cc:2:14: note: initializing argument 1 of 'int max_main(int, int)'
2 | int max_main(int,int);
... |
s127885218 | p03694 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int N;
vector<int> a;
cin >> N;
for (int i = 0; i < N; i++) {
int in;
cin >> in;
a.push_back(in);
}
sort(a.begin(), a.end());
int answer = a[N-1] - a[0];
cout << answer << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:17:3: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(a.begin(), a.end());
| ^~~~
| short
|
s410321777 | p03694 | Java | //Do what you can't.
import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class CB064C {
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
PrintWriter w = new PrintWriter(System.out);
int n=in.nextInt();
... | Main.java:6: error: class CB064C is public, should be declared in a file named CB064C.java
public class CB064C {
^
1 error
|
s350042276 | p03694 | Java | //Do what you can't.
import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class CB064C {
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
PrintWriter w = new PrintWriter(System.out);
int n=in.nextInt();
... | Main.java:12: error: ';' expected
for(int i=0;i<n;i++){int temp=in.nextInt(); mn=Math.min(mn,temp);mx=Math.max(mx,temp)}
^
Main.java:13: error: ';' expected
w.println(mx-mn)
^
2 errors
|
s851777153 | p03694 | C++ | N = input()
a = map(int, raw_input().split())
a.sort()
print a[-1] - a[0]
| a.cc:1:1: error: 'N' does not name a type
1 | N = input()
| ^
|
s970371633 | p03694 | C++ | #include<stdio.h>
#include<conio.h>
int a[100];
int main()
{
int i, n, mx,mn;
scanf("%d", &n);
for (i = 0; i < n; i++)
{
scanf("%d", &a[i]);
}
mx= a[0]; mn = a[0];
for (i = 1; i < n; i++)
{
if (mn > a[i])mn = a[i];
if (mx < a[i])mx = a[i];
}
int res=0;
res=mx-mn;
printf("%d",res);
return 0;
}
| a.cc:2:9: fatal error: conio.h: No such file or directory
2 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s455177241 | p03694 | C++ | #include <iostream>
#include <vector>
#include <numeric>
#include <algorithm>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
vector<int> a(N);
for (int i = 0; i < N; ++i) cin >> a[i];
cout << *std::max_element(a.begin(), a.end()) - *std::min_el... | a.cc: In function 'int main()':
a.cc:18:26: error: 'v' was not declared in this scope
18 | int sum = accumulate(v.begin(), v.end(), 0);
| ^
|
s390743365 | p03694 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sys/time.h>
using namespace std;
void solve(vector<int> coo) {
int maxcoo = max_element(coo.begin(), coo.end());
int mincoo = min_element(coo.begin(), coo.end());
std::cout << maxco... | a.cc: In function 'void solve(std::vector<int>)':
a.cc:12:29: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
12 | int maxcoo = max_element(coo.begin(), coo.end());
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
| ... |
s847534877 | p03694 | C++ | input()
coordinates = tuple(map(int, input().split()))
print(max(coordinates) - min(coordinates))
| a.cc:2:1: error: expected constructor, destructor, or type conversion before 'coordinates'
2 | coordinates = tuple(map(int, input().split()))
| ^~~~~~~~~~~
|
s579069293 | p03694 | C++ | #include <iostream>
#include <vector>
#include <numeric>
#include <algorithm>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
vector<int> a(N);
for (int i = 0; i < N; ++i) cin >> v[i];
cout << *std::max_element(a.begin(), a.end()) - *std::min_el... | a.cc: In function 'int main()':
a.cc:15:40: error: 'v' was not declared in this scope
15 | for (int i = 0; i < N; ++i) cin >> v[i];
| ^
a.cc:18:26: error: 'v' was not declared in this scope
18 | int sum = accumulate(v.begin(), v.end(), 0);
| ... |
s902090926 | p03694 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int N;
cin >> N;
int t = N -1;
int a[t];
for(int c = 0; c < N;c++){
cin >> a[c];
}
sort(a);
cout << a[t] - a[0] << "\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:17:7: error: no matching function for call to 'sort(int [t])'
17 | sort(a);
| ~~~~^~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::so... |
s788166607 | p03694 | C | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> houses;
int n, m;
cin >> n;
for(int i =0; i < n; ++i){
cin >> m;
houses.push_back(m);
}
sort(houses.begin(), houses.end());
cout << houses[n - 1] - houses[0] << endl;
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s526582490 | p03694 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sys/time.h>
using namespace std;
void solve(vector<int> coo) {
maxcoo = max_element(coo.begin(), coo.end());
mincoo = min_element(coo.begin(), coo.end());
std::cout << maxcoo - minc... | a.cc: In function 'void solve(std::vector<int>)':
a.cc:12:5: error: 'maxcoo' was not declared in this scope
12 | maxcoo = max_element(coo.begin(), coo.end());
| ^~~~~~
a.cc:13:5: error: 'mincoo' was not declared in this scope
13 | mincoo = min_element(coo.begin(), coo.end());
| ^~~~~~
|
s237679226 | p03694 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> houses;
int n, m;
cin >> n;
for(int i =0; i < n; ++i){
cin >> m;
houses.push_back(m);
}
sort(houses.begin(), houses.end());
cout << houses[n - 1] - houses[0] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(houses.begin(), houses.end());
| ^~~~
| short
|
s145876788 | p03694 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int N;
cin >> N;
int t = N -1;
int a[t];
for(int c = 0; c < N;c++){
cin >> a[c];
}
sort(a.begin(),a.end());
cout << a[t] - a[0] << "\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:17:10: error: request for member 'begin' in 'a', which is of non-class type 'int [t]'
17 | sort(a.begin(),a.end());
| ^~~~~
a.cc:17:20: error: request for member 'end' in 'a', which is of non-class type 'int [t]'
17 | sort(a.begin(),a.end());
| ... |
s507872144 | p03694 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
int t;
int arr[101];
scanf("%d",&t);
for(int i=0;i<t;i++)
{
scanf("%d",&arr[i]);
}
sort(arr);
printf("%d\n",arr[t-1]-arr[0]);
} | a.cc: In function 'int main()':
a.cc:13:5: error: no matching function for call to 'sort(int [101])'
13 | sort(arr);
| ~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::... |
s028223303 | p03694 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int N;
cin >> N;
int t = N -1;
int a[t];
for(int c = 0; c < N;c++){
cin >> a[c];
}
sort(a[0],[t]);
cout << a[N -1] - a[0] << "\n";
return 0;
} | a.cc: In lambda function:
a.cc:17:16: error: expected '{' before ')' token
17 | sort(a[0],[t]);
| ^
a.cc: In function 'int main()':
a.cc:17:7: error: no matching function for call to 'sort(int&, main()::<lambda()>)'
17 | sort(a[0],[t]);
| ~~~~^~~~~~~~~~
In file included from /usr/... |
s304032982 | p03694 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int N;
cin >> N;
int t = N -1;
int a[t];
for(int c = 0; c < N;c++){
cin >> a[c];
}
sort(a.begin(),a.end());
cout << a[N -1] - a[0] << "\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:17:10: error: request for member 'begin' in 'a', which is of non-class type 'int [t]'
17 | sort(a.begin(),a.end());
| ^~~~~
a.cc:17:20: error: request for member 'end' in 'a', which is of non-class type 'int [t]'
17 | sort(a.begin(),a.end());
| ... |
s417304620 | p03694 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
int arr[101];
scanf("%d",&t);
for(int i=0;i<t;i++)
{
scanf("%d",&arr[i]);
}
sort(arr);
printf("%d\n",arr[t-1]-arr[0]);
} | a.cc: In function 'int main()':
a.cc:12:5: error: no matching function for call to 'sort(int [101])'
12 | sort(arr);
| ~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14... |
s784198886 | p03694 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> houses;
int n, m;
cin >> n;
for(int i =0; i < n; ++i){
cin >> m;
houses.push_back(m);
}
sort(houses.begin(), houses.end());
cout << houses[n - 1] - houses[0] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(houses.begin(), houses.end());
| ^~~~
| short
|
s015844087 | p03694 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int N;
cin >> N;
int a[N - 1];
for(int c = 0; c < N,c++){
cin >> a[c];
}
sort(a.begin(),a.end());
cout << a[N -1] - a[0] << "\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:13:27: error: expected ';' before ')' token
13 | for(int c = 0; c < N,c++){
| ^
| ;
a.cc:17:10: error: request for member 'begin' in 'a', which is of non-class type 'int [(N + -1)]'
17 | sort(a.begin(),a.end()... |
s806547893 | p03694 | C++ | #include<iostream>
using namespace std;
int main(void){
int n;
int a[1001];
int ans;
cin>>n;
for(int i=0;i<n;i++)
cin>>a[i];
sort(a,a+n);
ans=a[n-1]-a[0];
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:9: error: 'sort' was not declared in this scope; did you mean 'short'?
15 | sort(a,a+n);
| ^~~~
| short
|
s392383048 | p03694 | C++ | #include<bits/stdc++.h>
int main()
{
int t;
int arr[101];
scanf("%d",&t);
for(int i=0;i<t;i++)
{
scanf("%d",&arr[i]);
}
sort(arr);
printf("%d\n",arr[t-1]-arr[0]);
} | a.cc: In function 'int main()':
a.cc:11:1: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
11 | sort(arr);
| ^~~~
| std::sort
In file included from /usr/include/c++/14/algorithm:86,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from ... |
s359524015 | p03694 | C++ | #include <stdio.h>
int main(){
int n;
scanf("%d",&n):
int min=1001,max=-1,t;
while(n--){
scanf("%d",&t);
if(t<min) min=t;
if(t>max) max=t;
}
printf("%d\n",max-min);
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:19: error: expected ';' before ':' token
5 | scanf("%d",&n):
| ^
| ;
a.cc:8:21: error: 't' was not declared in this scope
8 | scanf("%d",&t);
| ^
a.cc:9:14: error: 'min' was not declared ... |
s465573887 | p03694 | C++ | #include <stdio.h>
int main(){
int n;
scanf("%d",&n):
int min=1001,max=-1,t;
while(n--){
scanf("%d",&t);
if(t<min) min=t;
if(t>max) max=t;
}
printf("%d\n",max-min);
return 0;
} | a.cc: In function 'int main()':
a.cc:5:19: error: expected ';' before ':' token
5 | scanf("%d",&n):
| ^
| ;
a.cc:8:21: error: 't' was not declared in this scope
8 | scanf("%d",&t);
| ^
a.cc:9:14: error: 'min' was not declared ... |
s776611697 | p03694 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
int main(void) {
int min = INT_MAX, max = 0, n, t;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> t;
if (t < min) min = t;
if (t > max) max = t;
}
cout << max - min << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:19: error: 'INT_MAX' was not declared in this scope
9 | int min = INT_MAX, max = 0, n, t;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include <vector>
+... |
s696518311 | p03694 | C++ | In AtCoder, a person who has participated in a contest receives a color, which corresponds to the person's rating as follows:
Rating 1-399 : gray
Rating 400-799 : brown
Rating 800-1199 : green
Rating 1200-1599 : cyan
Rating 1600-1999 : blue
Rating 2000-2399 : yellow
Rating 2400-2799 : orange
Rating 2800-3199 : red
Oth... | a.cc:1:105: warning: missing terminating ' character
1 | In AtCoder, a person who has participated in a contest receives a color, which corresponds to the person's rating as follows:
| ^
a.cc:1:105: error: ... |
s323183340 | p03694 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <deque>
#include <vector>
#include <bitset>
#include <cmath>
#include <utility>
#define Maxn 100005
#define Maxm 1000005
#define lowbit... | a.cc: In function 'int main()':
a.cc:31:20: error: 'n' was not declared in this scope; did you mean 'yn'?
31 | while(cin>>n)
| ^
| yn
|
s190366402 | p03694 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
vector num;
int n;
cin>>n;
for(int i=0;i<n;i++){
int p;
cin>>p;
num.push_back(p);
}
sort(num.begin(),num.end());
cout<<num.back()-num.front();
} | a.cc: In function 'int main()':
a.cc:6:9: error: class template argument deduction failed:
6 | vector num;
| ^~~
a.cc:6:9: error: no matching function for call to 'vector()'
In file included from /usr/include/c++/14/vector:66,
from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:707:9:... |
s552802394 | p03694 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
vector<int> num;
int n;
cin>>n;
for(int i=0;i<n;i++){
int p;
cin>>p;
num.push_back(p);
}
sort(n.begin(),n.end());
cout<<num.back()-num.front();
} | a.cc: In function 'int main()':
a.cc:14:9: error: request for member 'begin' in 'n', which is of non-class type 'int'
14 | sort(n.begin(),n.end());
| ^~~~~
a.cc:14:19: error: request for member 'end' in 'n', which is of non-class type 'int'
14 | sort(n.begin(),n.end());
| ^... |
s068517626 | p03694 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
int n;cin>>n;
int up=0;low=1001;
for(int i=0;i<n;i++){
int t;cin>>t;
up=max(up,t);
low=min(low,t);
}
cout<<up-low<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:10: error: 'low' was not declared in this scope
8 | int up=0;low=1001;
| ^~~
|
s615119979 | p03694 | C++ | #include <cstdio>
#include <algorithm>
#include <vector>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
#include <string>
#include <bitset>
#include <fstream>
#include <iomanip>
using namespace std;
typedef long long ll;
typedef double db;
typedef v... | a.cc: In function 'int main()':
a.cc:40:4: error: 'cin' was not declared in this scope
40 | cin >> n;
| ^~~
a.cc:15:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
14 | #include <iomanip>
+++ |+#include <iostream>
15 |
a.cc:46:4: er... |
s315638283 | p03694 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
vector num;
int n;
cin>>n;
for(int i=0;i<n;i++){
int p;
cin>>p;
num.push_back(p);
}
sort(n.begin(),n.end());
cout<<num.back()-num.front();
} | a.cc: In function 'int main()':
a.cc:6:9: error: class template argument deduction failed:
6 | vector num;
| ^~~
a.cc:6:9: error: no matching function for call to 'vector()'
In file included from /usr/include/c++/14/vector:66,
from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:707:9:... |
s852844211 | p03694 | C++ | #include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int maxi=0,mini=1e9;
for(int i=0;i<n;i++)
{
int a;
cin>>a;
maxi=max(maxi,a);
mini=min(mini,a));
}
cout<<maxi-mini<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:17: error: expected ';' before ')' token
13 | mini=min(mini,a));
| ^
| ;
|
s054819543 | p03694 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> vec;
for (int i = 0; i < N; i++) {
int tmp;
cin >> tmp;
vec.push_back(tmp);
}
sort(vec.begin(), vec.end());
cout << *max_element(vec.begin(), vec.end()) -
... | a.cc: In function 'int main()':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'?
15 | sort(vec.begin(), vec.end());
| ^~~~
| short
a.cc:16:14: error: 'max_element' was not declared in this scope
16 | cout << *max_element(vec.begin(), vec.end()) -
| ... |
s178169198 | p03694 | C++ | #include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int maxi=0,mini=1e9;
for(int i=0;i<n;i++)
{
int a;
cin>>a;
maxi=max(maxi,a;
mini=min(mini,a));
}
cout<<maxi-mini<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:16: error: expected ')' before ';' token
12 | maxi=max(maxi,a;
| ~ ^
| )
a.cc:13:17: error: expected ';' before ')' token
13 | mini=min(mini,a));
| ^
| ;
|
s201782729 | p03694 | C++ | n = gets.to_i
a = gets.split(' ').map(&:to_i)
puts a.max - a.min | a.cc:1:1: error: 'n' does not name a type
1 | n = gets.to_i
| ^
|
s418553712 | p03694 | C++ | #include <iostream>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;
int a,b,c;
int main()
{
cin>>n;
maxi=0; mini=1001;
for(i=1;i<=n;i++)
{
cin>>x;
if(x>maxi) maxi=x;
if(x<mini) mini=x;
}
cout<<maxi-mini<<'\n';
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:10: error: 'n' was not declared in this scope
11 | cin>>n;
| ^
a.cc:12:5: error: 'maxi' was not declared in this scope
12 | maxi=0; mini=1001;
| ^~~~
a.cc:12:13: error: 'mini' was not declared in this scope
12 | maxi=0; mini=1001;
... |
s943763078 | p03694 | C | #include <stdio.h>
int main(void){
int min,max;
min=10000;
max=-1:
int kari;
int N;
scanf("%d",&N);
for(int i=0;i<N;i++){
scanf("%d",&kari);
if(min>kari)min=kari;
if(max<kari)max=kari;
}
printf("%d",max-min);
return 0;
}
| main.c: In function 'main':
main.c:6:11: error: expected ';' before ':' token
6 | max=-1:
| ^
| ;
main.c:12:21: error: 'kari' undeclared (first use in this function)
12 | scanf("%d",&kari);
| ^~~~
main.c:12:21: note: each undeclared identifier... |
s133546732 | p03694 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#define ll long long
using namespace std;
int A[1111];
int main() {
int N;
cin>>N;
for(int i=0;i<N;i++)
cin>>A[i];
sort(A,A+N);
cout << A[N-1]-A[0] << endl;
} | a.cc: In function 'int main()':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'?
15 | sort(A,A+N);
| ^~~~
| short
|
s148057399 | p03694 | C++ | 8
3 1 4 1 5 9 2 6 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 8
| ^
|
s843394966 | p03694 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
const int MAXN = 2e5;
const int INF = 1e9 + 7;
/*
void init(int x, int l, int r) {
if (l == r) {
tree[x] = INF;
} else {
int mid = (l + r) / 2;
init(x + x, l, mid);
init(x+x+1, mid + 1, r);
tree[... | a.cc: In function 'int main()':
a.cc:52:5: error: 'sort' was not declared in this scope; did you mean 'short'?
52 | sort(v.begin(), v.end());
| ^~~~
| short
|
s841633241 | p03695 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define reps(i,n) for(int i=1;i<(int)(n);i++)
typedef long long ll;
using namespace std;
int main()
{
ll n,a[110];
cin>>n;
rep(i,n)cin>>a[i];
ll cnt[9]={0};
rep(i,n){
if(a[i]>=1&&a[i]<400){
cnt[0]++;
}else if(a[i]>=400&&a[i]<8... | a.cc: In function 'int main()':
a.cc:39:12: error: no matching function for call to 'max(int, ll&)'
39 | cout<<max(1,m)<<" "<<m+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,
... |
s300745587 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = 1; i < (int)(n+1); i++)
int main(){
int N;
cin>>N;
int ans=0;
vector<int>A(N);
vector<int>B(8);
int S=0;
rep(i,8){
... | a.cc: In function 'int main()':
a.cc:31:32: error: 'p' was not declared in this scope
31 | cout<<max(ans,1)<<" "<<ans+p<<endl;
| ^
|
s441913204 | p03695 | C++ | v#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n-1; i >= 0; i--)
#define all(x) x.begin(), x.end()
using ll = long long;
using pii = pair<int, int>;
const int mod = 1e9+7;
int main() {
int n;
cin >> n;
int a[n];
set<int> s;
... | a.cc:1:2: error: stray '#' in program
1 | v#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'v' does not name a type
1 | v#include <bits/stdc++.h>
| ^
a.cc:7:13: error: 'pair' does not name a type
7 | using pii = pair<int, int>;
| ^~~~
a.cc: In function 'int main()':
a.cc:12:5: e... |
s889939138 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
long long a[n], c[9], t = 0;
for (long long i = 0; i < 9; i++) c[i] = 0;
for (long long i = 0; i < n; i++)
{
cin >> a[i];
if (a[i] >= 3200) c[8]++;
else c[a[i] / 400]++;
}
for (long ... | a.cc: In function 'int main()':
a.cc:16:16: error: no matching function for call to 'max(long long int&, int)'
16 | cout << max(t, 1) << ' ' << t + c[8];
| ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:... |
s903565827 | p03695 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i,n) for(ll i=0;i<n;++i)
#define ocut cout
#define ouct cout
#define itn int
struct Union{
vector<ll> par;
Union(ll a){
par=vector<ll>(a,-1);
}
ll find(ll a){
if(par[a]<0){
return a;
}... | a.cc: In function 'int main()':
a.cc:89:14: error: no matching function for call to 'max(int, ll&)'
89 | cout << max(1,ans) << " ";
| ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from... |
s773120996 | p03695 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N, ans = 0;
cin >> N;
vector<int> a(N);
for(auto& x: a) cin >> x;
unordered_map<string,int> mp;
for(int i = 0; i < N; ++i){
if ( 1 <= a[i] && a[i] <= 399) ++mp["gray"];
else if( 400 <= a[i] && a[i] <= 799) ++mp... | a.cc: In function 'int main()':
a.cc:25:9: error: expected '}' before 'else'
25 | else cout << max(ans,1) << " " << ans + mp["over"] << endl;
| ^~~~
a.cc:24:24: note: to match this '{'
24 | if(mp["over"] != 0){
| ^
a.cc: At global scope:
a.cc:27:5: error: exp... |
s581658965 | p03695 | C++ | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
#define rep(i, f, n) for (int i = (f); i < (int)(n); i++)
#define repe(i, f, n) for (int i = (f); i <= (int)(n); i++)
#define accum(x) accumulate((x).begin(), (x).end(), 0)
using... | a.cc: In function 'int main()':
a.cc:39:10: error: 'ifggV' was not declared in this scope
39 | else ifggV (2800 <= a && a <= 3199)
| ^~~~~
a.cc:41:5: error: 'else' without a previous 'if'
41 | else if (3200 <= a)
| ^~~~
|
s190424733 | p03695 | C++ | #include<iostream>
#include<vector>
#include <cmath>
#include <map>
#include <set>
#include <algorithm>
#include <string>
#define rep(i,n) for (int i= 0;i<(n);++i)
using namespace std;
typedef long long ll;
#define MOD 1000000007
int main()
{
ll N ;
cin >> N ;
ll a[N] ;
ll lv[9] ;
for(ll j = 0 ; ... | a.cc: In function 'int main()':
a.cc:41:16: error: expected ';' before '{' token
41 | if(ans == 0{
| ^
| ;
a.cc:43:6: error: expected primary-expression before 'else'
43 | }else{
| ^~~~
a.cc:43:6: error: expected ')' before 'else'
43 | }else{
... |
s032673064 | p03695 | Java | import java.util.HashMap;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
Main m = new Main5(sc);
m.solve();
m.show();
sc.close();
}
//フィールド
Scanner sc;
int N;
int... | Main.java:7: error: cannot find symbol
Main m = new Main5(sc);
^
symbol: class Main5
location: class Main
1 error
|
s859531000 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); ++i)
int main(void)
{
int n,c=0; cin>>n;
vector<int> color(9,0);
rep(i,n){
ll a; cin>>a;
if(a<3200) color[a/400]++;
else color[8]++;
}
rep(i,8) if(color[i]) c++;
if(c) cout << c;
e... | a.cc: In function 'int main()':
a.cc:10:9: error: 'll' was not declared in this scope
10 | ll a; cin>>a;
| ^~
a.cc:10:20: error: 'a' was not declared in this scope
10 | ll a; cin>>a;
| ^
|
s322762648 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int ... | a.cc: In function 'int main()':
a.cc:117:11: error: expected ';' before '}' token
117 | ans= 1
| ^
| ;
118 | }
| ~
a.cc: In function 'std::string split(std::string, ll, char)':
a.cc:93:2: warning: control reaches end of non-void function [-Wreturn-type]
93 | ... |
s893408030 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define repd(i, a, b) for (int i = a; i >= (b); --i)
#define all(x) (x).begin(), (x).end()
#... | a.cc: In function 'int main()':
a.cc:40:27: error: 'min' cannot be used as a function
40 | mmax = min(8, mmax);
| ~~~^~~~~~~~~
|
s477493319 | p03695 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <iomanip>
#include <map>
#include <stack>
using namespace std;
int main() {
int n, num, mi = 0, max = 0;
cin >> n;
vector <int> a(8);
for (int i = 0; i < n; i++) {
cin >> num;
}
for (int i = 0; i < n; i++) {
... | a.cc: In function 'int main()':
a.cc:37:2: error: expected '}' at end of input
37 | }
| ^
a.cc:11:12: note: to match this '{'
11 | int main() {
| ^
|
s889516866 | p03695 | C++ | #include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define pi 3.141592653589... | a.cc: In function 'int main()':
a.cc:24:12: error: 'a' was not declared in this scope
24 | cin >> a[i];
| ^
|
s044515179 | p03695 | C++ | #include<bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
using ll = long long;
using ull = unsigned long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP... | a.cc: In function 'int main()':
a.cc:47:14: error: no matching function for call to 'max(std::map<int, int>::size_type, int)'
47 | cout << max(mp.size() - (x>0),1) << ' ' << (x ? min(mp.size()-1+x,8) : mp.size()) << endl;
| ~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorith... |
s527283054 | p03695 | C++ | #include<bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
using ll = long long;
using ull = unsigned long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP... | a.cc: In function 'int main()':
a.cc:41:10: error: wrong number of template arguments (1, should be at least 2)
41 | map<int> mp;
| ^
In file included from /usr/include/c++/14/map:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
from a.cc:1:
/usr/inc... |
s708224352 | p03695 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception{
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int[] a = new int[n];
for(int i=0; i<a.length; i++){
a[i] = scn.nextInt();
}
int gra = 0;
int bro = 0;
int gre = 0;
int... | Main.java:35: error: cannot find symbol
lith++;
^
symbol: variable lith
location: class Main
Main.java:36: error: cannot find symbol
if(lith==1) count++;
^
symbol: variable lith
location: class Main
Main.java:56: error: no suitable method found for println(... |
s667369231 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair<int,int>
#define fi first
#define sc second
#define all(x) (x).begin(),(x).end()
int color(int n) {
if (n < 400) return 1;
else if (n < 800) return 2;
else if (n < 1200) return 3;
else if (n < 1600) return 4;
else if (n < ... | a.cc: In function 'int main()':
a.cc:41:14: error: no matching function for call to 'max(long long int, int)'
41 | cout << max((int) s.size(), 1) << ' ' << s.size() + c << '\n';
| ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_6... |
s124269554 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair<int,int>
#define fi first
#define sc second
#define all(x) (x).begin(),(x).end()
int color(int n) {
if (n < 400) return 1;
else if (n < 800) return 2;
else if (n < 1200) return 3;
else if (n < 1600) return 4;
else if (n < ... | a.cc: In function 'int main()':
a.cc:41:14: error: no matching function for call to 'max(std::set<long long int>::size_type, int)'
41 | cout << max(s.size(), 1) << ' ' << s.size() + c << '\n';
| ~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/incl... |
s278718981 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair<int,int>
#define fi first
#define sc second
#define all(x) (x).begin(),(x).end()
int color(int n) {
if (n < 400) return 1;
else if (n < 800) return 2;
else if (n < 1200) return 3;
else if (n < 1600) return 4;
else if (n < ... | a.cc: In function 'int main()':
a.cc:41:33: error: no matching function for call to 'min(long long unsigned int, long long int)'
41 | cout << s.size() << ' ' << min(s.size() + c, 8LL) << '\n';
| ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
... |
s042707282 | p03695 | C++ | /**
* author: FromDihPout
* created: 2020-07-29
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
vector<int> range = {3200, 2800, 2400, 2000, 1600, 1200, 800, 400, 1};
const int COLS = range.size();
int n;
cin >> n;
... | a.cc: In function 'int main()':
a.cc:35:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<int>')
35 | cout << cnt << endl;
| ~~~~ ^~ ~~~
| | |
| | std::vector<int>
| std::ostream {aka std::b... |
s646192953 | p03695 | C++ | #include<bits/stdc++.h>
using namespace std;
///Welcome to Nasif's Code
#define bug printf("bug\n");
#define bug2(var) cout<<#var<<" "<<var<<endl;
#define co(q) cout<<q<<endl;
#define all(q) (q).begin(),(q).end()
typedef long long int ll;
typedef unsigned long long int ull;
const int MOD = (int)1e9+7;
const int MAX = 1... | a.cc: In function 'int main()':
a.cc:73:11: error: expected ';' before 'cout'
73 | mx+=ex
| ^
| ;
74 | cout<<mn<<" " <<mx<<endl;
| ~~~~
|
s723810236 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int r;
vector<bool> memo(8);
for (int i = 0; i < N; i++) {
int a;
cin >> a;
if (a >= 3200) {
r++;
}
else {
int c = 0;
while (true) {
a -= 400;
if (a < 0) {
break;
... | a.cc: In function 'int main()':
a.cc:29:9: error: 'mmeo' was not declared in this scope; did you mean 'memo'?
29 | if (mmeo.at(i)) {
| ^~~~
| memo
|
s838507093 | p03695 | C++ | #include <iostream>
#include <cstdlib>
#include <time.h>
#include <algorithm>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <array>
#include <string>
#include <iomanip>
#include <cstring>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ext/pb_ds/assoc_container.hpp>
#includ... | a.cc: In function 'int main()':
a.cc:127:40: error: expected primary-expression before ')' token
127 | else if(k == 0 or k <= )
| ^
|
s409951684 | 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:48:12: error: no matching function for call to 'max(long long int&, int)'
48 | cout<<max(d,1)<<" "<<d+e;
| ~~~^~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/... |
s003402532 | p03695 | C++ | #ifndef LOCAL
#pragma GCC optimize("O3")
#endif
#include "bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ... | a.cc: In function 'int main()':
a.cc:86:40: error: no matching function for call to 'min(long long int, long long unsigned int)'
86 | cout << mp.size() << ' ' << min(8LL, fre + mp.size()) << endl;
| ~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/... |
s607577343 | p03695 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
int main() {
int n;
cin >> n;
vector<int> rate(8);
int red=0;
rep(i,n) {
int ibuff;
cin >> ibuff;
if (ibuff<=399) rate.at(0)++... | a.cc:34:3: error: extended character is not valid in an identifier
34 | //最小値は現在使用している色の数
| ^
a.cc: In function 'int main()':
a.cc:34:3: error: '\U00003000' was not declared in this scope
34 | //最小値は現在使用している色の数
| ^~
a.cc:37:7: error: 'else' without a previous 'if'
37 | } else {
... |
s681406817 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
int give_numbers(int x){
int res = 0;
while(x >= 0){
res += 1;
x -= 400;
}
return res;
}
int main(){
int n;
cin >> n;
vector<int>arr(n);
for(int i = 0; i < n; i++){
cin >> arr[i];
... | a.cc: In function 'int main()':
a.cc:41:5: error: expected ',' or ';' before 'cout'
41 | cout << mn << " " << mx << endl;
| ^~~~
|
s421333145 | 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;
using P = pair<string,int>;
const double PI = acos(-1);
string iro(int x){
string color;
if(x >= 3200) color = "ziyu";
else if(x >= 2800) color = "aka";
else if(x >= 2400) color = "daidai";
... | a.cc: In function 'int main()':
a.cc:29:55: error: invalid types '<unresolved overloaded function type>[const char [5]]' for array subscript
29 | if(9-mp.size() >= mp["ziyu"]) max = mp.size()+mp.at["ziyu"]-1;
| ^
|
s960516447 | 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;
using P = pair<string,int>;
const double PI = acos(-1);
string iro(int x){
string color;
if(x >= 3200) color = "ziyu";
else if(x >= 2800) color = "aka";
else if(x >= 2400) color = "daidai";
... | a.cc: In function 'int main()':
a.cc:26:13: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
26 | rep(i,n) mp[a.at(i)]++;
| ^
In file included from /usr/include/c... |
s413590248 | 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;
using P = pair<string,int>;
const double PI = acos(-1);
string iro(int x){
string color;
if(x >= 3200) color = "ziyu";
else if(x >= 2800) color = "aka";
else if(x >= 2400) color = "daidai";
... | a.cc: In function 'int main()':
a.cc:29:55: error: invalid types '<unresolved overloaded function type>[const char [5]]' for array subscript
29 | if(7-mp.size() >= mp["ziyu"]) max = mp.size()+mp.at["ziyu"]-1;
| ^
|
s502860488 | 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;
using P = pair<string,int>;
const double PI = acos(-1);
string iro(int x){
string color;
if(x >= 3200) color = "ziyu";
else if(x >= 2800) color = "aka";
else if(x >= 2400) color = "daidai";
... | a.cc: In function 'int main()':
a.cc:26:13: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
26 | rep(i,n) mp[a.at(i)]++;
| ^
In file included from /usr/include/c... |
s953157043 | p03695 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using ll=long long;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll INF=1LL<<60;
int n;... | a.cc: In function 'int main()':
a.cc:29:17: error: no matching function for call to 'max(int, std::set<std::__cxx11::basic_string<char> >::size_type)'
29 | int minv=max(1,rate.size());
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/inclu... |
s942882385 | p03695 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using ll=long long;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll INF=1LL<<60;
int n;... | a.cc: In function 'int main()':
a.cc:29:20: error: 'arate' was not declared in this scope; did you mean 'rate'?
29 | int minv=max(1,arate.size());
| ^~~~~
| rate
|
s229877193 | p03695 | C++ | /**
* created: 07.07.2020 18:55:08
**/
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// using bint = boost::multiprecision::cpp_int;
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s);... | a.cc: In function 'int main()':
a.cc:45:21: error: no matching function for call to 'max(std::__cxx1998::map<long long int, long long int, std::less<long long int>, std::allocator<std::pair<const long long int, long long int> > >::size_type, int)'
45 | else cout << max(mp.size()-1,1) << " " << min(8ll, (int)mp.s... |
s540644429 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
const int p = 8;
int n; cin >> n;
vector<int> num(p + 1, 0);
int free = 0;
for (int i = 0; i < n; i++) {
int a; cin >> a;
for (int j = 1; j <= p; j++) {
if (400 * (j - 1) <= a && a < 400 * j) {
num[j] = 1;
}
}
if (... | a.cc:26:2: error: stray '#' in program
26 | }#include <bits/stdc++.h>
| ^
a.cc:26:3: error: 'include' does not name a type
26 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:30:5: error: redefinition of 'int main()'
30 | int main() {
| ^~~~
a.cc:5:5: note: 'int main()' previously defined he... |
s458774889 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
int getMin(int min, int &wild){
if (min == 0){
wild--;
return 1;
}else{
return min;
}
}
int getMax(int min, int wild){
int max = 0;
// if (min + wild >= 8){
// max = 8;
// }else{
// max = min + wild;
... | a.cc: In function 'int getMax(int, int)':
a.cc:21:21: error: expected ';' before 'return'
21 | max = min + wild
| ^
| ;
22 |
23 | return max;
| ~~~~~~
a.cc:24:1: warning: no return statement in function returning non-void [-Wretu... |
s283485765 | p03695 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
int main(){
int n;
cin >> n;
const int NUM_RATE = 9;//レート帯の数
//レートからレート帯の番号を返す関数
auto rate_to_idx = [&](int r){
vector<P> edges;
edges.push_back(make_pair(1,399)... | a.cc: In function 'int main()':
a.cc:53:7: error: redeclaration of 'int ans_max'
53 | int ans_max = min(exist_cols + strong,8);
| ^~~~~~~
a.cc:52:7: note: 'int ans_max' previously declared here
52 | int ans_max = exist_cols + min(zeros,strong);
| ^~~~~~~
a.cc: In lambda function:
a.cc:... |
s598376536 | p03695 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll mod=1000000007;
const int MAX_N = 1000; // n の最大値
// nCk を取得
double nCk(int n, int k) {
double res=1.0;
for(int i=0; i<n; i++){
res*=0.5;}
for(int i=0; i<k; i++){
res*=(double)(n-i);
res/=(double)(k-... | a.cc: In function 'int main()':
a.cc:49:19: error: no matching function for call to 'min(int, ll)'
49 | cout<<ca<<" "<<min(8,ca+(int)s[8])<<endl;}
| ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.... |
s758061018 | p03695 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll mod=1000000007;
const int MAX_N = 1000; // n の最大値
// nCk を取得
double nCk(int n, int k) {
double res=1.0;
for(int i=0; i<n; i++){
res*=0.5;}
for(int i=0; i<k; i++){
res*=(double)(n-i);
res/=(double)(k-... | a.cc: In function 'int main()':
a.cc:49:19: error: no matching function for call to 'min(int, ll)'
49 | cout<<ca<<" "<<min(8,ca+s[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,
... |
s153402011 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
#define sws ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ll long long
#define vi vector<int>
#define pb push_back
#define pii pair<int, int>
#define mp make_pair
#define ff first
#define ss second
#define vvi vector<vi>
#define all(x) x.begin(), x.end()
#d... | a.cc: In function 'int main()':
a.cc:37:16: error: no matching function for call to 'max(int, std::set<std::__cxx11::basic_string<char> >::size_type)'
37 | cout << max(1, cores.size()) << " " << min((int) ratings.size(), (int) cores.size() + cont3200) << endl;
| ~~~^~~~~~~~~~~~~~~~~
In file inc... |
s554688842 | p03695 | C++ | #include<bits/stdc++.h>
using namespace std;
#define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cout<<fixed; cout<<setprecision(12);
#define randomINT mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
#define newl cout<<"\n"
#define DISP(as) for(auto it : as) cout<<it<<" ";n... | a.cc: In function 'void MAIN()':
a.cc:64:22: error: no matching function for call to 'max(const long long int&, int)'
64 | ll mini = max(min(color[8],1ll),accumulate(color.begin(),color.begin()+8,0));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file include... |
s852981867 | p03695 | C++ | #include <bits/std++.h>
using namespace std;
int rate(int x){
if(x>=1 && x<=399){
return 0;
}else if(x>=400 && x<=799){
return 1;
}else if(x>=800 && x<=1199){
return 2;
}else if(x>=1200 &&x<=1599){
return 3;
}else if(x>=1600 && x<=1999){
return 4;
}else if(x>=2000 && x<=2399){
retu... | a.cc:1:10: fatal error: bits/std++.h: No such file or directory
1 | #include <bits/std++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s668959197 | p03695 | Java | import java.util.Scanner;
public class ColorfulLeaderBoard {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc=new Scanner(System.in);
//コンテストの参加人数
int N=sc.nextInt();
//各参加者のレート数配列
int[] a=new int[N];
//色を数えるための配列
int[] colorCount=new i... | Main.java:3: error: class ColorfulLeaderBoard is public, should be declared in a file named ColorfulLeaderBoard.java
public class ColorfulLeaderBoard {
^
1 error
|
s841498234 | p03695 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc=new Scanner(System.in);
//コンテストの参加人数
int N=sc.nextInt();
//各参加者のレート数配列
int[] a=new int[N];
//色を数えるための配列
int[... | Main.java:56: error: ';' expected
freeColor += 1
^
1 error
|
s909125888 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> col(9, 0);
for(int i = 0; i < n; i++){
int a;
cin >> a;
col[max(a/400, 8)]++;
}
int ans = 0;
for(int i = 0; i < 8; i++){
if(col[i] != 0) ans++;
}
int ma = ans + c... | a.cc: In function 'int main()':
a.cc:21:9: error: redeclaration of 'int mi'
21 | int mi = min(mi, 8);
| ^~
a.cc:20:9: note: 'int mi' previously declared here
20 | int mi = max(ans, col[8]);
| ^~
|
s611573995 | p03695 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
int gy = 0, br = 0, gr = 0, cy = 0, bl = 0, yl = 0, org = 0, r = 0, h = 0;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
if(x >= 0 && x <= 399) {
gy = 1;
}
els... | a.cc: In function 'int main()':
a.cc:46:101: error: 'y' was not declared in this scope
46 | cout << gy + br + gr + cy + bl + yl + org + r << " " << gy + br + gr + cy + bl + yl + org + r + y << endl;
| ^
|
s076554345 | p03695 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
#define f first
#define s second
#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define pb push_back
#d... | a.cc: In function 'int main()':
a.cc:58:16: error: no matching function for call to 'min(int, ll)'
58 | res.s = min(8,res.f+v[10]);
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s480681516 | p03695 | C++ | #include <iostream>
using names
#include <iostream>
using namespace std;
int main() {
int colo[9]={};
int n;
cin>>n;
int arr[n];
for (int i=0; i<n; i++){
cin >> arr[i];
}
for (int i=0; i<n; i++){
for(int j = 0; j <=7;j++){
if(400 * j <=arr[i] && arr[i] < 400 * (j + 1))colo[j]++;
}
if(a... | a.cc:2:7: error: expected nested-name-specifier before 'names'
2 | using names
| ^~~~~
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
10 | cin>>n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/ios... |
s403971283 | p03695 | C++ | #ifdef DEBUG
#else
# pragma GCC optimize("O3,no-stack-protector")
# pragma GCC optimize("unroll-loops")
# if __cplusplus < 201703L
# pragma GCC target("avx")
# else
# pragma GCC target("avx2")
# endif
#endif
// 実数の場合
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tun... | 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:19:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = in... |
s710281846 | p03695 | C++ | #include"bits/stdc++.h"
#define rep(i, N) for(int i = 0;i < N;i++)
typedef long long ll;
const int mod = 1e9 + 7;
using namespace std;
int main(void) {
int N; cin >> N;
vector<int> a(N);
rep(i, N)cin >> a[i];
set<int> s;
int x = 0;
rep(i, N) {
if (a[i] < 399)s.insert(0);
else if (a[i] < 799)s.insert(1);... | a.cc: In function 'int main()':
a.cc:29:55: error: no matching function for call to 'min(std::set<int>::size_type, int)'
29 | cout << (s.size()==0?1:s.size()) << " " << min(s.size()+x, 8) << endl;
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include... |
s933047444 | p03695 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int>a(N);
set<int,int>Set;
int ans = 0;
for(int i = 0; i < N; i++) {
cin >> a[i];
if(a[i]/400 >= 8) {
ans++;
}
else {
Set.insert(a[i]/400);
}
}
... | In file included from /usr/include/c++/14/map:62,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
from a.cc:1:
/usr/include/c++/14/bits/stl_tree.h: In instantiation of 'std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Co... |
s813186573 | p03695 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int N;
cin >> N;
vector<int>a(N);
set<int,int>Set;
int ans = 0;
for(int i = 0; i < N; i++) {
cin >> a[i];
if(a[i]/400LL >= 8LL) {
ans++;
}
else {
Set.insert(... | In file included from /usr/include/c++/14/map:62,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
from a.cc:1:
/usr/include/c++/14/bits/stl_tree.h: In instantiation of 'std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Co... |
s035913406 | p03695 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int N;
cin >> N;
vector<int>a(N);
set<int,int>Set;
int ans = 0;
for(int i = 0; i < N; i++) {
cin >> a[i];
if(a[i]/400 >= 8) {
ans++;
}
else {
Set.insert(a[i]... | In file included from /usr/include/c++/14/map:62,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
from a.cc:1:
/usr/include/c++/14/bits/stl_tree.h: In instantiation of 'std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Co... |
s954848442 | p03695 | C++ | using namespace std;
using ll = long long int;
using pii = pair<int, int>;
#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i=0; i<(int)(n); i++)
ll GCD(ll c, ll d){
if(c<d)swap(c,d);
if(c%d==0)return d;
else{return GCD(c%d,d);}
}
int main() {
int n;cin>>n;
vector<int> v(n);
rep(i,n){
cin>>v.at(i);
... | a.cc:3:13: error: 'pair' does not name a type
3 | using pii = pair<int, int>;
| ^~~~
a.cc: In function 'll GCD(ll, ll)':
a.cc:8:10: error: 'swap' was not declared in this scope
8 | if(c<d)swap(c,d);
| ^~~~
a.cc: In function 'int main()':
a.cc:14:9: error: 'cin' was not declare... |
s180662168 | p03695 | C++ | // https://ei1333.github.io/luzhiled/
// http://beet-aizu.hatenablog.com/entry/2017/01/04/113233
// http://www.prefield.com/algorithm/
#include <bits/stdc++.h>
constexpr char bn = '\n';
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vd = vector<ld>;
using vs = vector<str... | a.cc: In function 'int main()':
a.cc:104:29: error: expected ';' before ')' token
104 | out(max(ans,1ll),ans+ad));
| ^
| ;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.