submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s236550833 | p00001 | C++ | import scala.io.Source
object Main extends App {
val src = Source.io.stdin.getLines.map(_.toInt).toList
val top3: List[Int] = src.sortWith(_<_).take(3)
top3.map(println)
} | a.cc:1:1: error: 'import' does not name a type
1 | import scala.io.Source
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s613382480 | p00001 | C++ | #include<iostream>
#include <vector>
#define REP(i,n) for(int i=0;i<(int)n;++i)
#define REPI(i,a,b) for(int i=(int)a;i<(int)b;++i)
using namespace std;
void solver() {
vector<int> m;
REP(i,10){
int n;
cin>>n;
m.push_back(n);
}
sort(m.begin(),m.end(),greater<int>());
REP(i,3)... | a.cc: In function 'void solver()':
a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(m.begin(),m.end(),greater<int>());
| ^~~~
| short
|
s823171719 | p00001 | C++ | #include<iostream>
#include <vector>
#define REP(i,n) for(int i=0;i<(int)n;++i)
using namespace std;
void solver() {
vector<int> m;
REP(i,10){
int n;
cin>>n;
m.push_back(n);
}
sort(m.begin(),m.end(),greater<int>());
REP(i,3){
cout<<m[i]<<endl;
}
}
int main() {
... | a.cc: In function 'void solver()':
a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(m.begin(),m.end(),greater<int>());
| ^~~~
| short
|
s564144293 | p00001 | C++ | #include<iostream>
using namespace std;
int main(){
int first = 0;
int second = 0;
int third = 0;
for(int i = 0; i < 10; i++){
int num;
if(first <= num){
third = second;
second = first;
first = num;
}else if((second <= num) && (num < first) ){
thid = second;
second = num;
}else if((third <... | a.cc: In function 'int main()':
a.cc:17:25: error: 'thid' was not declared in this scope; did you mean 'third'?
17 | thid = second;
| ^~~~
| third
|
s162476237 | p00001 | C++ | #include<iostream>
using namespace std;
int main(){
int first = 0;
int second = 0;
int third = 0;
for(int i = 0; i < 10; i++){
int num;
cin >> num;
if(first <= num){
third = second;
second = first;
first = num;
}else if((second <= num) && (num < first) ){
thid = second;
second = num;
}e... | a.cc: In function 'int main()':
a.cc:19:25: error: 'thid' was not declared in this scope; did you mean 'third'?
19 | thid = second;
| ^~~~
| third
|
s181943190 | p00001 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int data[10]={0};
for (int A=0;A<10;A++){
cin>>data[A];
}
sort(A,A+10);
cout<<data[9]<<data[8]<<data[7];
return 0;
} | a.cc: In function 'int main()':
a.cc:9:14: error: 'A' was not declared in this scope
9 | sort(A,A+10);
| ^
|
s508317959 | p00001 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
vector<int> yama(10);
for(int i=0;i<10;i++){
cin >> yama[i];
}
sort(yama.begin(),yama.end);
cout << yama[9] << "\n" << yama[8] << "\n" << yama[7] << "\n";... | a.cc: In function 'int main()':
a.cc:12:9: error: no matching function for call to 'sort(std::vector<int>::iterator, <unresolved overloaded function type>)'
12 | sort(yama.begin(),yama.end);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc... |
s557077612 | p00001 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int a[15];
int main(){
for(int i=0;i<10;i++) cin >> a[i];
sort(a,a+n);
cout << a[9] << endl << a[8] << endl << a[7] << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:14: error: 'n' was not declared in this scope
8 | sort(a,a+n);
| ^
|
s261342913 | p00001 | C++ | #include<iostream>
#include<array>
int main(void){
std::array<int,10> h;
int tmp;
for(auto& e : h){
std::cin>>e;
}
std::sort(h.begin(),h.end());
for(int i=0;i<3;i++){
std::cout<<h[i]<<std::endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:6: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
9 | std::sort(h.begin(),h.end());
| ^~~~
| qsort
|
s373521207 | p00001 | C++ | #include<iostream>
#include<array>
int main(void){
std::array<int,10> h;
int tmp;
for(auto& e : h){
std::cin>>e;
}
std::sort(h.begin(),h.end());
for(int i=0;i<3;i++){
std::cout<<h[i]<<std::endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:6: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
9 | std::sort(h.begin(),h.end());
| ^~~~
| qsort
|
s850927147 | p00001 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
int main(void){
std::vector<int> h;
int tmp;
while(std::cin>>tmp){
h.push_back(tmp);
}
std::sort(h.begin(),h.end());
std::uniq(h.begin(),h.end());
for(int i=0;i<3;i++){
std::cout<<h[i]<<std::endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:6: error: 'uniq' is not a member of 'std'; did you mean 'unique'?
11 | std::uniq(h.begin(),h.end());
| ^~~~
| unique
|
s187025105 | p00001 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
int main(void){
std::vector<int> h;
int tmp;
while(std::cin>>tmp){
h.push_back(tmp);
}
std::sort(h.begin(),h.end());
auto p=std::unique(h.begin(),h.end());
std::cout<<p++<<std::endl;
std::cout<<p++<<std::endl;std::cout<<p<<std::endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__normal_iterator<int*, std::vector<int> >')
12 | std::cout<<p++<<std::endl;
| ~~~~~~~~~^~~~~
| | |
| | __gnu_cxx::__no... |
s626114326 | p00001 | C++ | #include <iostream>
using namespace std;
int main()
{
int a, max1, max2, max3;
max1 = max2 = max3 = INT_MIN;
while(cin >> a)
{
if(a > max3)
{
max3 = a;
if(a > max1)
{
max3 = max2;
max2 = max1;
max1 = a;
... | a.cc: In function 'int main()':
a.cc:8:27: error: 'INT_MIN' was not declared in this scope
8 | max1 = max2 = max3 = INT_MIN;
| ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
1 | #include <iostream>
... |
s043748975 | p00001 | C++ | fn main(){
let mut hs: Vec<i32> = vec![];
for _i in 0..10{
let n=readln();
hs.push(n);
}
hs.sort();
for i in (7..10).rev(){
println!("{}",hs[i]);
}
}
// --- template ---
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
pub trait FromLn {... | a.cc:3:15: error: too many decimal points in number
3 | for _i in 0..10{
| ^~~~~
a.cc:8:15: error: too many decimal points in number
8 | for i in (7..10).rev(){
| ^~~~~
a.cc:15:2: error: invalid preprocessing directive #[
15 | #[allow(unused_imports)]
| ... |
s662195752 | p00001 | C++ | fn main(){
let mut hs: Vec<i32> = vec![];
for _i in 0..10{
let n=readln();
hs.push(n);
}
hs.sort();
for i in (7..10).rev(){
println!("{}",hs[i]);
}
}
// --- template ---
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
pub trait FromLn {... | a.cc:3:15: error: too many decimal points in number
3 | for _i in 0..10{
| ^~~~~
a.cc:8:15: error: too many decimal points in number
8 | for i in (7..10).rev(){
| ^~~~~
a.cc:15:2: error: invalid preprocessing directive #[
15 | #[allow(unused_imports)]
| ... |
s133794079 | p00001 | C++ | #include<stdio.h>
#include<algorithm>
int main() {
int m[10];
for (int i = 0; i < 10; i++)scanf("%d",%m[i]);
stable_sort(m, m + 10);
for (int i = 9; i > 6; i--)printf("%d\n",&m[i]);
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:44: error: expected primary-expression before '%' token
7 | for (int i = 0; i < 10; i++)scanf("%d",%m[i]);
| ^
a.cc:9:5: error: 'stable_sort' was not declared in this scope; did you mean 'std::stable_sort'?
9 | stabl... |
s651699984 | p00001 | C++ | N = 10
a = []
for i in range(N):
a.append(input()) # 3度の入力に対して、1, 2, 3 と入力。
print(a) # ['1', '2', '3']
| a.cc:4:23: error: stray '#' in program
4 | a.append(input()) # 3度の入力に対して、1, 2, 3 と入力。
| ^
a.cc:4:25: error: extended character 、 is not valid in an identifier
4 | a.append(input()) # 3度の入力に対して、1, 2, 3 と入力。
| ^
a.cc:4:53: error: extended character... |
s244548962 | p00001 | C++ | #include <stdio.h>
#include <functional>
int main(){
int mt[10], i;
std::sort(mt, mt + 10, std::greater<int>);
for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0;
}
| a.cc: In function 'int main()':
a.cc:5:8: error: 'sort' is not a member of 'std'
5 | std::sort(mt, mt + 10, std::greater<int>);
| ^~~~
a.cc:5:43: error: expected primary-expression before ')' token
5 | std::sort(mt, mt + 10, std::greater<int>);
| ... |
s104736035 | p00001 | C++ |
#include <stdio.h> #include <functional> #include <algorithm<int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; }
| a.cc:3:20: warning: extra tokens at end of #include directive
3 | #include <stdio.h> #include <functional> #include <algorithm<int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; }
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-l... |
s976900121 | p00001 | C++ | #include <stdio.h> #include <functional> #include <algorithm>int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; }
| a.cc:1:20: warning: extra tokens at end of #include directive
1 | #include <stdio.h> #include <functional> #include <algorithm>int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; }
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-l... |
s894300038 | p00001 | C++ | #include <stdio.h> #include <functional> #include <algorithm> int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; }
| a.cc:1:20: warning: extra tokens at end of #include directive
1 | #include <stdio.h> #include <functional> #include <algorithm> int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; }
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-... |
s409668558 | p00001 | C++ | #include <stdio.h>
#include <functional>
#include <algorithm>
int main(){ int mt[10], i;
std::sort(mt, mt + 10
for (i = 9; i > 6; i--)
printf("%d\n", mt[i]);
return 0; }
| a.cc: In function 'int main()':
a.cc:5:22: error: expected ')' before 'for'
5 | std::sort(mt, mt + 10
| ~ ^
| )
6 | for (i = 9; i > 6; i--)
| ~~~
a.cc:6:23: error: expected ';' before ')' token
6 | for (i = 9; i > 6; i--)
| ... |
s732701117 | p00001 | C++ | def main():
a=[]
for i in range(10):
a.append(int(input()))
a.sort()
for j in range(-1, -4, -1):
print(a[j])
| a.cc:1:1: error: 'def' does not name a type
1 | def main():
| ^~~
|
s408690731 | p00001 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main() {
int height[10];
for (int i = 0; i < 10; ++i) cin >> height[i];
sort(height, height + 10, greater<int>);
cout << height[0] << height[1] << height[2] << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:43: error: expected primary-expression before ')' token
8 | sort(height, height + 10, greater<int>);
| ^
|
s390535229 | p00001 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
vector<int> v;
for(int i=0;i<10;i++){
int m;
cin >> m;
v.push_back(m);
}
sort(v.begin(), v.end(), greater<int>());
cout << v.at(0) << endl;
cout << v.at(1) << endl;
cout << v.at(2) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(v.begin(), v.end(), greater<int>());
| ^~~~
| short
|
s785766708 | p00001 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
vector<int> v;
for(int i=0;i<10;i++){
int m;
cin >> m;
v.push_back(m);
}
sort(v.begin(), v.end(), greater<int>());
cout << v.at(0) << endl;
cout << v.at(1) << endl;
cout << v.at(2) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(v.begin(), v.end(), greater<int>());
| ^~~~
| short
|
s053545783 | p00001 | C++ | #include <stdio.h> using namespace std; int main(){ int count[10001],tmp,num=3; for(int i=0;i<10001;i++)count[i]=0; for(int i=0;i<10;i++){ scanf("%d",&tmp); count[tmp]++; } for(int i=10000;i>=0&&num>0;i--){ if(count[i]>0){ for(int k=0;k<count[i]&&num>0;k++){ printf("%d\n",i); num--; } } } return 0; }
| a.cc:1:20: warning: extra tokens at end of #include directive
1 | #include <stdio.h> using namespace std; int main(){ int count[10001],tmp,num=3; for(int i=0;i<10001;i++)count[i]=0; for(int i=0;i<10;i++){ scanf("%d",&tmp); count[tmp]++; } for(int i=10000;i>=0&&num>0;i--){ if(count[i]>0){ for(int k=0;k<count[i]&&num... |
s321659406 | p00001 | C++ | #include <stdio.h>
using namespace std;
int main(){
int count[10001],
tmp,num=3;
for(int i=0;i<10001;i++){
count[i]=0;
for(int i=0;i<10;i++){
scanf("%d",&tmp);
count[tmp]++;
}
for(int i=10000;i>=0&&num>0;i--){
if(count[i]>0){
for(int k=0;k<count[i]&&num>0;k++){
printf("%d\n",i);
num--;
}
}
}
re... | a.cc: In function 'int main()':
a.cc:28:12: error: expected '}' at end of input
28 | return 0; }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s650441881 | p00001 | C++ | #include <iostream>
#include <map>
using namespace std;
int main() {
multimap<int, greater<int>> mp; int temp; int c = 0;
while (cin >> temp) { mp[c] = temp; c++; }
for (int i = 0; i < 3; i++) cout << mp[i] << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:33: error: no match for 'operator[]' (operand types are 'std::multimap<int, std::greater<int> >' and 'int')
7 | while (cin >> temp) { mp[c] = temp; c++; }
| ^
a.cc:8:47: error: no match for 'operator[]' (operand types are 'std::mul... |
s605296076 | p00001 | C++ | #include <iostream>
using namespace std;
int main()
{
int mt[10];
for(int i=0;i<10;i++)
cin >> mt[i];
sort(mt,mt+10,greater<int>());
for(int i=0;i<3;i++)
cout << mt[i] << endl;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(mt,mt+10,greater<int>());
| ^~~~
| short
|
s175714243 | p00001 | C++ | #include <iostream>
using namespace std;
main() {
int a[10];
for(int i=0;i<10;i++) scanf("%d",&a[i]);
sort(a,a+10,greater<int>());
printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'sort' was not declared in this scope; did you mean 'short'?
6 | sort(a,a+10,greater<int>());
| ^~~~
| short
|
s964713549 | p00001 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<function>
using namespace std;
int main()
{
int i;
int a;
vector<int> num;
for(i=0;i<10;i++)
{
cin >> a ;
num.push_back(a);
}
sort(num.begin(),num.end(),greater<int>());
for(i=0;i<3;i++)
cout << num[i] << endl;
} | a.cc:4:9: fatal error: function: No such file or directory
4 | #include<function>
| ^~~~~~~~~~
compilation terminated.
|
s419566415 | p00001 | C++ | #include<stdio.h>
#include<algorithm>
main(){int a[10],i;for(i=0;i<10;i++)cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){int a[10],i;for(i=0;i<10;i++)cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);}
| ^~~~
a.cc: In function 'int main()':
a.cc:3:37: error: 'cin' was not declared in this scope
3 | main(){int a[10],i... |
s391489068 | p00001 | C++ | #include<stdio.h>
#include<algorithm>
main(){int a[10],i;for(i=0;i<10;i++)std::cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){int a[10],i;for(i=0;i<10;i++)std::cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);}
| ^~~~
a.cc: In function 'int main()':
a.cc:3:42: error: 'cin' is not a member of 'std'
3 | main(){int a[10],i;... |
s831714423 | p00001 | C++ | #include<iostream>
#include<algorithm>
main(){int a[10],i;for(i=0;i<10;i++)std::cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){int a[10],i;for(i=0;i<10;i++)std::cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);}
| ^~~~
a.cc: In function 'int main()':
a.cc:3:45: error: no match for 'operator<<' (operand types are 'std::istream... |
s083307368 | p00001 | C++ | #include<iostream>#include<algorithm>#include<vector>using namespace std;
int main(){vector<int> a(10);int i=0;for(;i++<10;)cin>>a[i];sort(a.begin(),a.end());cout<<a[9]<<"\n"<<a[8]<<"\n"<<a[7]<<endl;} | a.cc:1:19: warning: extra tokens at end of #include directive
1 | #include<iostream>#include<algorithm>#include<vector>using namespace std;
| ^
a.cc: In function 'int main()':
a.cc:2:12: error: 'vector' was not declared in this scope
2 | int main(){vector<int> a(10);int i=0;for(;i++<10;)... |
s870387937 | p00001 | C++ | main(int a,int*b){
for(a=0;a<3;++a)b[a]=0;
for(;~scanf("%d",&b[3]);)
for(a=4;--a;b[a]<b[a-1]?:(b[a-1]^=b[a]^=b[a-1]^=b[a]));
for(a=0;a<3;++a)printf("%d\n",b[a]);
} | a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(int a,int*b){
| ^~~~
a.cc:1:1: warning: second argument of 'int main(int, int*)' should be 'char **' [-Wmain]
a.cc: In function 'int main(int, int*)':
a.cc:3:15: error: 'scanf' was not declared in this scope
3 |... |
s789170678 | p00001 | C++ | #import<algo.h>
main(){int i=0,h[10];for(;i<10;)cin>>h[i++];sort(h,h+10);for(i=9;i>6;)cout<<h[i--]<<endl;exit(0);} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<algo.h>
| ^~~~~~
a.cc:1:8: fatal error: algo.h: No such file or directory
1 | #import<algo.h>
| ^~~~~~~~
compilation terminated.
|
s016462785 | p00001 | C++ | #include<stdio.h>
int main(){
int yama[10];
int temp;
int i,j;
for(i=0;i<10;i++){
scanf("%d",&yama[i];
}
for(i=0;i<10;i++){
for("j=0;j<10;j++){
if(yama[i]>yama[j]){
temp=yama[j];
yama[j]=yama[i];
yama[i]=yama[j];
}
}
}
for(i=0;i<3;i++){
printf("%d\n",yama[i]);
}
return 0;
} | a.cc:11:5: warning: missing terminating " character
11 | for("j=0;j<10;j++){
| ^
a.cc:11:5: error: missing terminating " character
11 | for("j=0;j<10;j++){
| ^~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:20: error: expected ')' before ';' token
8 | scanf("%d",&yama[i];
| ... |
s938809989 | p00001 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
vector<int> high;
for(int i=0 ; i<10 ; i++){
cin >> n;
high.push_back( n );
}
sort( high.begin() , high.end() );
for(int i=9 ; i>=7 ; i--){
cout << high.at( i ) << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort( high.begin() , high.end() );
| ^~~~
| short
|
s352709919 | p00001 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main()
{
vector<int> arr(10);
for(int i = 0; i < 10; i++){
cin >> arr[i];
}
sort(arr.begin(),arr.end());
printf("%d\n%d\n%d\n",a[10],a[9],a[8]);
return 0;
} | a.cc: In function 'int main()':
a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(arr.begin(),arr.end());
| ^~~~
| short
a.cc:16:31: error: 'a' was not declared in this scope
16 | printf("%d\n%d\n%d\n",a[10],a[9],a[8]);
| ... |
s891698859 | p00001 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main()
{
vector<int> arr(10);
for(int i = 0; i < 10; i++){
cin >> arr[i];
}
sort(arr.begin(),arr.end());
printf("%d\n%d\n%d\n",arr[10],arr[9],arr[8]);
return 0;
} | a.cc: In function 'int main()':
a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(arr.begin(),arr.end());
| ^~~~
| short
|
s801356060 | p00001 | C++ | #include <stdio.h>
int main(){
int talls[10], max, banme;
for(int i = 0; i < 10; i++) scanf("%d", &talls[i]);
for(int i = 0; i < 10; i++){
max = 0;
for(int j = 0; j < 10; j++){
if(max < talls[j]){
max = talls[j];
banme = j;
}
}
printf("%d\n", max);
talls[j] = 0;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:15:23: error: 'j' was not declared in this scope
15 | talls[j] = 0;
| ^
|
s836819450 | p00001 | C++ | s[];main(i){for(;~scanf("%d",s);)qsort(s,i++,4,"YXZQQQ\x8b\0+\x02\xc3");printf("%d\n%d\n%d\n",s[9],s[8],s[7]);} | a.cc:1:1: error: 's' does not name a type
1 | s[];main(i){for(;~scanf("%d",s);)qsort(s,i++,4,"YXZQQQ\x8b\0+\x02\xc3");printf("%d\n%d\n%d\n",s[9],s[8],s[7]);}
| ^
a.cc:1:9: error: expected constructor, destructor, or type conversion before '(' token
1 | s[];main(i){for(;~scanf("%d",s);)qsort(s,i++,4,"YXZQQ... |
s518438269 | p00001 | C++ | # include <iostream>
using namespace std;
void main(){
for(int i =1;i<=9;i++){
for(int j=1;j<=9;j++){
cout <<i<<"x"<<j<<"="<<i*j<<"\n";
}
}
} | a.cc:3:1: error: '::main' must return 'int'
3 | void main(){
| ^~~~
|
s095354053 | p00001 | C++ | #include<iostream.h>
#include<vector.h>
#include<algorithm.h>
int main(){int n,i;vector<int> h;for(i=0;i<10;++i)cin>>n,h.push_back(n);sort(h.begin(),h.end());for(i=9;i>6;i--)cout<<h[i]<<endl;} | a.cc:1:9: fatal error: iostream.h: No such file or directory
1 | #include<iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s291880846 | p00001 | C++ | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int[] dat = new int[10];
for(int tc = 0; tc < 10; ++tc) {
dat[tc] = s.nextInt();
}
Arrays.sort(dat);
for(int i = 0; i < 3; ++i) {
System.out.println(dat[9-i]);
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s267500080 | p00001 | C++ | import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
class Main {
private void topThreeHills() {
Scanner sc = new Scanner(System.in);
ArrayList<Integer> hlist = new ArrayList<Integer>(10);
while (sc.hasNext()) {
hlist.add(sc.nextInt());
}
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.ArrayList;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.Collections;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmo... |
s395937374 | p00001 | C++ | #include <stdio.h>
int main(){
int a,b,c,d,a_max,N[10];
for(a=0;a<10;a++){
scanf("%d",&N[a]);
}
for(b=0;b<10;b++){
b=a_max;
for(c=b;c<10;c++){
if(a_max<c){c=a_max;
}
d=c; c=a_max; a_max=d;
}
printf(... | a.cc: In function 'int main()':
a.cc:20:2: error: expected '}' at end of input
20 | }
| ^
a.cc:2:11: note: to match this '{'
2 | int main(){
| ^
|
s335690311 | p00001 | C++ | #include <stdio.h>
int main(){
int a,b,c,d,a_max,N[10];
for(a=0;a<10;a++){
scanf("%d",&N[a]);
}
for(b=0;b<10;b++){
b=a_max;
for(c=b;c<10;c++){
if(N[a_max]<N[c]){
c=a_max;
}
d=c;
c=a_max;
a_max=d; }
printf("%d\n%d\n%d\n",N[0],N[1],N[2]);
return 0;
} | a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:2:11: note: to match this '{'
2 | int main(){
| ^
|
s864547656 | p00001 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
int main(){
int a[10],i=0;
for(;i<10;i++)scanf("%d",&a[i]);
sort(a,a+10);
for(i=0;i<3;i++)pritnf("%d\n",a[i]);
return 0;
} | a.cc: In function 'int main()':
a.cc:10:25: error: 'pritnf' was not declared in this scope; did you mean 'printf'?
10 | for(i=0;i<3;i++)pritnf("%d\n",a[i]);
| ^~~~~~
| printf
|
s372851203 | p00001 | C++ | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
List<Integer> l = new ArrayList<Integer>();
for (int i = 0; i < 10; i++) {
int t = sc.nextInt();
l.add(t);
}
Collections.sort(l);
Collections.reverse(l);
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s477970883 | p00001 | C++ | #include <vector>
#include <iostream>
using namespace std;
int main(){
int height;
vector<int> heights;
while (cin >> height)
heights.push_back(height);
sort(heights.begin(), heights.end(), greater<int>());
for (int i = 0; i < 3; i++)
cout << heights[i] << endl;
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(heights.begin(), heights.end(), greater<int>());
| ^~~~
| short
|
s733924733 | p00001 | C++ | main(a){for(printf("3776\n2848\n2840\n");~scanf("%d",&a););} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(a){for(printf("3776\n2848\n2840\n");~scanf("%d",&a););}
| ^
|
s215255486 | p00001 | C++ | a[],i;
c(int*a){a=*a-*1[&a];}
main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));} | a.cc:1:1: error: 'a' does not name a type
1 | a[],i;
| ^
a.cc:2:1: error: ISO C++ forbids declaration of 'c' with no type [-fpermissive]
2 | c(int*a){a=*a-*1[&a];}
| ^
a.cc: In function 'int c(int*)':
a.cc:2:14: error: invalid conversion from 'int' to 'int*' [-fpermissive]
2 | c(int*a){a=*a-*1[&... |
s520975756 | p00001 | C++ | #include<stdio.h>
#include<algorithm>
int main()
{
int i,j,a[10];
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
}
sort(a,a+10);
printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
return 0;
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
10 | sort(a,a+10);
| ^~~~
| std::sort
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: ... |
s654839020 | p00001 | C++ | #include <iostream>
using namespace std;
int main(){
bool completed,flag;
int result[3],buf,temp[10];
for(int i = 0; i < 10; i++){
cin >> temp[i];
}
for(int l = 0; l < 3; l++{
while(1){
for(int j = l; j < 9; j++){
if(temp[j] < temp[j+1]){
buf = temp[j+1];
temp[j+1] = temp[j];
temp[j] = b... | a.cc: In function 'int main()':
a.cc:10:34: error: expected ')' before '{' token
10 | for(int l = 0; l < 3; l++{
| ~ ^
| )
a.cc:19:37: error: expected ';' before 'for'
19 | flag = false
| ... |
s313845217 | p00001 | C++ | #include<iostream>
using namespace std;
main()
{ int s=0;
int x[10]={0,0,0,0,0,0,0,0,0,0,0};
int t[3]={0,0,0};
for(int i=0;i<0;i++){
cin>>x[i];
}
for(int k=0;k<3;k++){
for(int j=0;j<10;j++){
if(t[k]<x[j]){
s=t[k];
t[k]=x[j];
x[j]=s;
}
}
}
for(int e=0;e<3... | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:5:35: error: too many initializers for 'int [10]'
5 | int x[10]={0,0,0,0,0,0,0,0,0,0,0};
| ^
|
s739596178 | p00001 | C++ | a;main(){a=!puts("10000\n9999\n9998");} | a.cc:1:1: error: 'a' does not name a type
1 | a;main(){a=!puts("10000\n9999\n9998");}
| ^
a.cc:1:3: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | a;main(){a=!puts("10000\n9999\n9998");}
| ^~~~
a.cc: In function 'int main()':
a.cc:1:10: error: 'a' was not declared ... |
s591340747 | p00001 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
vector<int> m(10);
for(int i=0; i<10; i++){
cin >> m[i];
}
sort(m.begin(), m.end());
cout << m[9] << endl;
cout << m[8] << endl;
cout << m[7] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(m.begin(), m.end());
| ^~~~
| short
|
s122632167 | p00001 | C++ | #include <stdio.h>
#include <algorithm>
using namespace std;
int main()
{
int i, arr[100];
for (i=0;i<10;i++)
scanf ("%d", &arr[i]);
sort (arr, arr+10);
printf ("%d\n", a[9]);
printf ("%d\n", a[8]);
printf ("%d\n", a[7]);
return 0;
} | a.cc: In function 'int main()':
a.cc:10:17: error: 'a' was not declared in this scope
10 | printf ("%d\n", a[9]);
| ^
|
s594516611 | p00001 | C++ | a,b,c;main(t){for(;~scanf("%d",&t);)t>a&&(a=t),a>b&&(t=a,a=b,b=t),b>c&&(t=c,c=b,b=t);printf("%d\n%d\n%d\n",c,b,a);} | a.cc:1:1: error: 'a' does not name a type
1 | a,b,c;main(t){for(;~scanf("%d",&t);)t>a&&(a=t),a>b&&(t=a,a=b,b=t),b>c&&(t=c,c=b,b=t);printf("%d\n%d\n%d\n",c,b,a);}
| ^
a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token
1 | a,b,c;main(t){for(;~scanf("%d",&t);)t>a&&(a=t),a... |
s740784514 | p00001 | C++ | #include <iostream>
#include <queue>
using namespace std;
void AOJ0001::st(){
int c;
priority_queue<int> pq;
for (int i=0;i<10;i++){
cin >> c;
pq.push(c);
}
for (int i=0;i<3;i++){
cout << pq.top() << endl;
pq.pop();
}
} | a.cc:4:6: error: 'AOJ0001' has not been declared
4 | void AOJ0001::st(){
| ^~~~~~~
|
s985781184 | p00001 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> input;
for (int i = 0; i < 10; i++) {
int tmp;
cin >> tmp;
input.push_back(tmp);
}
sort(input.rbegin(), input.rend());
for (int i = 0; i < 3; i++) {
cout << input[i] << endl;
}
} | a.cc: In function 'int main()':
a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(input.rbegin(), input.rend());
| ^~~~
| short
|
s594150192 | p00001 | C++ | /* test */ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s704006319 | p00001 | C++ | #include<iostream>
using namespace std;
int main()
{
int a[10];
for(int i=0;i<10;i++)
cin>>a[i];
for(int i=0;i<9;i++)
for(int j=i+1;i<10;j++)
if a[i]<a[j]
{
int tmp=a[i];
a[i]=a[j]
a[j]=tmp;
}
cout<<a[1];
cout<<a[2];
cout<<a[3];
return 0;
} | a.cc: In function 'int main()':
a.cc:10:6: error: expected '(' before 'a'
10 | if a[i]<a[j]
| ^
| (
|
s717379712 | p00001 | C++ | #include <iostream>
using namespace std;
int main() {
int hill[10];
for(int i=0;i < 10;i++) {
cin >> hill[i];
}
sort(hill,hill + 10);
cout << hill[9] << endl
<< hill[8] << endl
<< hill[7] << endl;
} | a.cc: In function 'int main()':
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(hill,hill + 10);
| ^~~~
| short
|
s029730695 | p00001 | C++ | #include <iostream>
using name space std
int main(){
int hight[10];
int Num;
int naka;
int flag;
for(Num=0;Num!=10;Num++)
{
cin>>hight[Num];
};
for(Num=0;flag!=0;flag=0,Num=0)
{
if(hight[Num]<hight[(Num+1)])
{naka=hight[Num];
hight[Num]=hight[(Num+1)];
hight[(Num+1)]=naka;
flag++; };
};
cin<<hight[0]<<endl;
ci... | a.cc:21:9: error: stray '#' in program
21 | flag++; };
| ^
a.cc:2:7: error: expected nested-name-specifier before 'name'
2 | using name space std
| ^~~~
|
s965415885 | p00001 | C++ | Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unaccept... | a.cc:1:1: error: 'Unacceptable' does not name a type
1 | Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submis... |
s173389664 | p00001 | C++ | #include <iostream>
void swap(int *a, int *b);
int main(void)
{
int b[3]={0,0,0};
int i=0;
for(; i < 10; i++){
int s;
scanf("%d",&s);
if(b[2] < s){b[2]=s);}
if(b[1] < b[2]){swap(&b[1],&b[2]);}
if(b[0] < b[1]){swap(&b[0],&b[1]);}
}
std::cout << b[0] << std::endl << b[1] << std::endl << b[2] << std::endl;
return 0;
}
... | a.cc: In function 'int main()':
a.cc:12:20: error: expected ';' before ')' token
12 | if(b[2] < s){b[2]=s);}
| ^
| ;
|
s171638403 | p00001 | C++ | #include<iostream>
#include<vector>
#include<functional>
using namespace std;
int main(){
vector<int> height(10);
for(int i=0; i<10; i++){
cin >>height[i];
}
sort(height.begin(),height.end(),greater<int>());
cout <<height[0]<<endl<<height[1]<<endl<<height[2]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(height.begin(),height.end(),greater<int>());
| ^~~~
| short
|
s365373365 | p00001 | C++ | #include <iostream>
#include <functional>
#include <list>
using namespace std;
int main(){
list<int> height_list(10);
for(int i=0; i<10; ++i){
int height;
cin >> height;
height_list.push_back(height);
}
height_list.sort(greater<int>());
list<int>::iterator ite = height_list.begin();
for(int i=0; i<3; ++i... | a.cc: In function 'int main()':
a.cc:20:18: error: expected '}' at end of input
20 | return 0;
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s085913978 | p00001 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <list>
#include <cmath>
#include <fstream>
#include <queue>
#include <sstream>
#include <algorithm>
#include <cstring>
using namespace std;
emplate <class T> void change(T &a, T &b)// 交换
{
T temp;
temp = a;
a = b;
b = temp;
}... | a.cc:13:1: error: 'emplate' does not name a type
13 | emplate <class T> void change(T &a, T &b)// 交换
| ^~~~~~~
a.cc: In instantiation of 'void quicksort(std::vector<_Tp>&, int, int) [with T = int]':
a.cc:45:11: required from here
45 | quicksort(vi,0,9);
| ~~~~~~~~~^~~~~~~~
a.c... |
s089730042 | p00001 | C++ | #include <stdio.h>
void main(void)
{
int a[3] = {0,0,0};
int b,c;
for(int i = 0; i < 10; i++){
scanf("%d", &b);
for(int j = 2; j >= 0; j--){
if(a[j] < b){
c = a[j];
a[j] = b;
b = c;
}
}
}
for(int i = 2; i >= 0; i--)
printf("%d\n", a[i]);
} | a.cc:3:1: error: '::main' must return 'int'
3 | void main(void)
| ^~~~
|
s730998746 | p00001 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
vector<int> heights(10);;
for(int i = 0; i < 10; ++i){
cin >> heights[i];
}
sort(heights.begin(), heights.end(), greater<int>());
for(int i = 0; i < 3; ++i){
cout << heights[i] << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(heights.begin(), heights.end(), greater<int>());
| ^~~~
| short
|
s637320724 | p00001 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
vector<int> heights(10);;
for(int i = 0; i < 10; ++i){
cin >> heights[i];
}
sort(heights.begin(), heights.end(), greater<int>());
for(int i = 0; i < 3; ++i){
cout << heights[i] << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(heights.begin(), heights.end(), greater<int>());
| ^~~~
| short
|
s005071287 | p00001 | C++ | #include <iostream>
#include <algorithm>
#include <functional
using namespace std;
int main()
{
int h[10];
for (int i = 0; i < 10; ++i) cin >> h[i];
sort(h, h+10, greater<int>());
cout << h[0] << endl << h[1] << endl << h[2] << endl;
return 0;
} | a.cc:3:21: error: missing terminating > character
3 | #include <functional
| ^
|
s567899725 | p00001 | C++ | #include<stdio.h>
int main()
{
int high[10] = {1819,2003,876,2876,1723,1673,3776,2848,1592,922};
for(int i=0;i<9;i++)
{
for( int cases; int j=i+1; j<10; j++)
{
if(high[i] < high[j])
{
cases = high[i];
high[i] = high[j];
high[j] = cases;
}
}
}
printf("%d",high[0]);
printf("%d",high[... | a.cc: In function 'int main()':
a.cc:9:48: error: expected ')' before ';' token
9 | for( int cases; int j=i+1; j<10; j++)
| ~ ^
| )
a.cc:9:50: error: 'j' was not declared in this scope
9 | ... |
s373692282 | p00001 | C++ | #include<stdio.h>
int main()
{
int high[10] = {1819,2003,876,2876,1723,1673,3776,2848,1592,922};
int cases
for(int i=0;i<9;i++)
{
for(int j=i+1; j<10; j++)
{
if(high[i] < high[j])
{
cases = high[i];
high[i] = high[j];
high[j] = cases;
}
}
}
printf("%d",high[0]);
printf("%d",high[1... | a.cc: In function 'int main()':
a.cc:8:9: error: expected initializer before 'for'
8 | for(int i=0;i<9;i++)
| ^~~
a.cc:8:21: error: 'i' was not declared in this scope
8 | for(int i=0;i<9;i++)
| ^
|
s637200877 | p00001 | C++ | #include<stdio.h>
int main()
{
int high[10];
int cases;
for(int i=0;i<9;i++)
{
printf("height of mountain %d",i);
scanf("%d",&high[i]);
pirntf("\n");
}
for(int i=0;i<9;i++)
{
for(int j=i+1; j<10; j++)
{
if(high[i] < high[j])
{
cases = high[i];
high[i] = high[j];
high[j] = cases... | a.cc: In function 'int main()':
a.cc:12:17: error: 'pirntf' was not declared in this scope; did you mean 'printf'?
12 | pirntf("\n");
| ^~~~~~
| printf
|
s666249546 | p00001 | C++ | #include <stdio.h>
#include <math.h>
#include <iostream>
using namespace std;
int main(void){
int x[10],top[3];
int i;
for(i=0;i<3;i++){
top[i] = 0;
}
for(i=0;i<10;i++){
std::cin >> x[i];
if(top[0] < x[i]){
top[2] = top[1];
top[1] = top[0];
top[0] = x[i];
}
if(top[1] < x[i]){
top[2] = top[1... | a.cc: In function 'int main()':
a.cc:30:18: error: expected '}' at end of input
30 | return 0;
| ^
a.cc:6:15: note: to match this '{'
6 | int main(void){
| ^
|
s794160159 | p00001 | C++ | #include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
int i,j,arr[11];
for(i=1;i<=10;i++)
{
for(j=1;j<=3;j++)
scanf("%d",&arr[j]);
sort(arr,10);
printf("%d\n",arr[j]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:13: error: no matching function for call to 'sort(int [11], int)'
11 | sort(arr,10);
| ~~~~^~~~~~~~
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: 'templat... |
s209242570 | p00001 | C++ | #include <stdio.h>
void sortarry(int* Array,int n )
{
int Tmp=0;
int i=0;
int j=0;
for(i=0;i<n-1;i++)
{
for(j=i+1;j<n;j++)
{
if(Array[i]<Array[j] )
{
Tmp=Array[i];
Array[i]= Array[j];
Array[j]= Tmp;
}
}
}
return ;
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s089342511 | p00001 | C++ | #include <iostream>
int main()
{
int i,high[10];
for(i = 0;i < 10;++i){
cin >> high[i];
}
sort(high[0]);
cout << high[0];
cout << high[1];
cout << high[2];
}
void sort(int *a)
{
int i,first = 0,secand = 0,third = 0;
for(i = 0;i < 10;++i){
if(first < *(a + i)){
... | a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin >> high[i];
| ^~~
| 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; ... |
s654902426 | p00001 | C++ | #include <iostream>
int main()
{
int i,high[10];
for(i = 0;i < 10;++i){
std::cin >> high[i];
}
sort(high[0]);
std::cout << high[0];
std::cout << high[1];
std::cout << high[2];
}
void sort(int *a)
{
int i,first = 0,secand = 0,third = 0;
for(i = 0;i < 10;++i){
if(first... | a.cc: In function 'int main()':
a.cc:9:5: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(high[0]);
| ^~~~
| short
|
s108531956 | p00001 | C++ | #include <iostream>
int main()
{
int i,high[10];
for(i = 0;i < 10;++i){
std::cin >> high[i];
}
manko::sort(high[0]);
std::cout << high[0];
std::cout << high[1];
std::cout << high[2];
}
namespace manko{
void sort(int *a)
{
int i,first = 0,secand = 0,third = 0;
for(i... | a.cc: In function 'int main()':
a.cc:9:5: error: 'manko' has not been declared
9 | manko::sort(high[0]);
| ^~~~~
|
s033983996 | p00001 | C++ | #include <iostream>
void sort(int *a);
int main()
{
int i,high[10];
for(i = 0;i < 10;++i){
std::cin >> high[i];
}
sort(high[0]);
std::cout << high[0];
std::cout << high[1];
std::cout << high[2];
}
void sort(int *a)
{
int i,first = 0,secand = 0,third = 0;
for(i = 0;... | a.cc: In function 'int main()':
a.cc:11:16: error: invalid conversion from 'int' to 'int*' [-fpermissive]
11 | sort(high[0]);
| ~~~~~~^
| |
| int
a.cc:3:16: note: initializing argument 1 of 'void sort(int*)'
3 | void sort(int *a);
| ~... |
s267673093 | p00001 | C++ | #include <iostream>
void sort(int* a);
int main()
{
int i,high[10];
for(i = 0;i < 10;++i){
std::cin >> high[i];
}
sort(high[0]);
std::cout << high[0];
std::cout << high[1];
std::cout << high[2];
}
void sort(int* a)
{
int i,first = 0,secand = 0,third = 0;
for(i = 0;... | a.cc: In function 'int main()':
a.cc:11:16: error: invalid conversion from 'int' to 'int*' [-fpermissive]
11 | sort(high[0]);
| ~~~~~~^
| |
| int
a.cc:3:16: note: initializing argument 1 of 'void sort(int*)'
3 | void sort(int* a);
| ~... |
s909123654 | p00001 | C++ | v=[];v<<$_.to_i while gets
3.times{|i|p v.sort.reverse[i]} | a.cc:1:1: error: 'v' does not name a type
1 | v=[];v<<$_.to_i while gets
| ^
a.cc:1:6: error: 'v' does not name a type
1 | v=[];v<<$_.to_i while gets
| ^
|
s734598391 | p00001 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int a[10];fefepjp
while(cin>>a[0]){
for(int i=1;i<10;i++)cin>>a[i];
sort(a,a+10,greater<int>());
for(int i=0;i<4;i++)
cout<<a[i]<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:13: error: 'fefepjp' was not declared in this scope
8 | int a[10];fefepjp
| ^~~~~~~
|
s522441117 | p00001 | C++ | #include<iostream>
#include<algorithm>
int main()
{
int height(10);
for(int i=0;i<10;++i)
{
std::cin >> height[i];
}
std::sort(height.begin(),height.end());
std::cout << height[9] << '\n';
std::cout << height[8] << '\n';
std::cout << height[7] << '\n';
} | a.cc: In function 'int main()':
a.cc:11:27: error: invalid types 'int[int]' for array subscript
11 | std::cin >> height[i];
| ^
a.cc:14:22: error: request for member 'begin' in 'height', which is of non-class type 'int'
14 | std::sort(height.begin(),height.end());
... |
s226703268 | p00001 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int x[10];
for(int i = 0; i < 10; i++){
cin >> x[i];
}
sort(x,x + 10);
cout << x[9] << endl; << x[8] << endl; << x[7] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:31: error: expected primary-expression before '<<' token
11 | cout << x[9] << endl; << x[8] << endl; << x[7] << endl;
| ^~
a.cc:11:48: error: expected primary-expression before '<<' token
11 | cout << x[9] << endl; << x[8]... |
s069778454 | p00001 | C++ | #include<iostream>
int main(){
int high[10];
int highest[3];
for(int i=0;i<10;i++){
cin>>high[i];}
highest[0]=high[0];
for(int i=1;i<10;i++){
if(high[i]>highest[0]){
highest[2]=highest[1];
highest[1]=highest[0];
highest[0]=high[i];}
if(highest[0]>=high[i]&&high[i]>highest[1]){
highest[2]=highest[1];
highest[1]=high[i]... | a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>high[i];}
| ^~~
| 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 stan... |
s656585311 | p00001 | C++ | #include <iostream>
using namespace std;
int main()
{
int array[10];
for(int i=0; i<10; i++)
cin>>array[i];
for(i=0; i<9; i++){
for(int j=i+1; j<10; j++){
if(array[i]<array[j]){
int tmp=array[i];
array[i]=array[j];
ar... | a.cc: In function 'int main()':
a.cc:11:9: error: 'i' was not declared in this scope
11 | for(i=0; i<9; i++){
| ^
a.cc:21:9: error: 'i' was not declared in this scope
21 | for(i=0; i<3; i++)
| ^
|
s295503224 | p00001 | C++ | #include<iostream>
using namespace std;
int main(){
int a[10];
for(int i=0;i<10;i++){
cin>>a[i];
}
sort(a,a+10);
cout<<a[9]<<endl<<a[8]<<endl<<a[7];
} | a.cc: In function 'int main()':
a.cc:9:5: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(a,a+10);
| ^~~~
| short
|
s582147492 | p00001 | C++ | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <set>
using namespace std;
typedef long long LL;
#define CY 505
#define NODE 1005
int ar[CY][CY], f[CY],... | a.cc: In function 'void solve(int)':
a.cc:70:53: error: redeclaration of 'int u'
70 | int u = find_set(f[i * 2]);
| ^
a.cc:65:53: note: 'int u' previously declared here
65 | ... |
s857500478 | p00001 | C++ | num = []
i=0
while i < 10
num[i] = gets.to_i
i+=1
end
num.sort!{|a, b| (-1) * (a <=> b)}
puts "result"
for n in 0..2
puts "#{num[n]}"
end | a.cc:11:10: error: too many decimal points in number
11 | for n in 0..2
| ^~~~
a.cc:1:1: error: 'num' does not name a type; did you mean 'enum'?
1 | num = []
| ^~~
| enum
a.cc:10:1: error: 'puts' does not name a type
10 | puts "result"
| ^~~~
|
s666412027 | p00001 | C++ | num = []
i=0
while i < 10
num[i] = gets.to_i
i+=1
end
num.sort!{|a, b| (-1) * (a <=> b)}
for n in 0..2
puts "#{num[n]}"
end | a.cc:10:10: error: too many decimal points in number
10 | for n in 0..2
| ^~~~
a.cc:1:1: error: 'num' does not name a type; did you mean 'enum'?
1 | num = []
| ^~~
| enum
a.cc:10:1: error: expected unqualified-id before 'for'
10 | for n in 0..2
| ^~~
|
s872320926 | p00001 | C++ | #include <iostream>
int main(int argc, const char * argv[])
{
using namespace std;
int max = 0;
int second = 0;
int third = 0;
int n[10];
for(int i = 0; i < 10; i++) cin >> n[i];
sort(n,n+10,greater<int>());
max = n[0];
second = n[1];
third = n[2];
cou... | a.cc: In function 'int main(int, const char**)':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
13 | sort(n,n+10,greater<int>());
| ^~~~
| short
|
s260752560 | p00001 | C++ | #include <iostream>
int main(int argc, const char * argv[])
{
using namespace std;
int max = 0;
int second = 0;
int third = 0;
int n[10];
for(int i = 0; i < 10; i++) cin >> n[i];
sort(n,n+10,greater<int>());
max = n[0];
second = n[1];
third = n[2];
cou... | a.cc: In function 'int main(int, const char**)':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
13 | sort(n,n+10,greater<int>());
| ^~~~
| short
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.