submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s239458215
|
p00000
|
C++
|
#include<stdio.h>
int main(void){
int printf(1x1=1,1x2=2,..9x8=72,9x9=81)
return 0;
}
|
a.cc: In function 'int main()':
a.cc:4:20: error: unable to find numeric literal operator 'operator""x1'
4 | int printf(1x1=1,1x2=2,..9x8=72,9x9=81)
| ^~~
a.cc:4:26: error: unable to find numeric literal operator 'operator""x2'
4 | int printf(1x1=1,1x2=2,..9x8=72,9x9=81)
| ^~~
a.cc:4:32: error: expected primary-expression before '.' token
4 | int printf(1x1=1,1x2=2,..9x8=72,9x9=81)
| ^
a.cc:4:33: error: expected unqualified-id before numeric constant
4 | int printf(1x1=1,1x2=2,..9x8=72,9x9=81)
| ^~~~
a.cc:4:41: error: unable to find numeric literal operator 'operator""x9'
4 | int printf(1x1=1,1x2=2,..9x8=72,9x9=81)
| ^~~
a.cc:4:47: error: expression list treated as compound expression in initializer [-fpermissive]
4 | int printf(1x1=1,1x2=2,..9x8=72,9x9=81)
| ^
|
s773809645
|
p00000
|
C++
|
output = function() {
console.log.apply( console, arguments );
};
(function kuku( a, b ) {
if ( a > 9 )
return;
if ( b > 9 )
return kuku( a + 1, 0 );
output( '%dx%d=%d', a, b, a * b );
return kuku( a, b + 1 );
})( 1, 1 );
|
a.cc:10:17: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
10 | output( '%dx%d=%d', a, b, a * b );
| ^~~~~~~~~~
a.cc:1:1: error: 'output' does not name a type
1 | output = function() {
| ^~~~~~
a.cc:5:10: error: expected ')' before 'kuku'
5 | (function kuku( a, b ) {
| ~ ^~~~~
| )
a.cc:12:2: error: expected unqualified-id before ')' token
12 | })( 1, 1 );
| ^
|
s875638975
|
p00000
|
C++
|
#include <cstdio>
2 int main(){
3 for(int i=1;i<10;i++){
4 for(int j=1;j<10;j++){
5 printf("%dx%d=%d\n",i,j,i*j);
6 }
7 }
8 return 0;
9 }
10
11
|
a.cc:2:3: error: expected unqualified-id before numeric constant
2 | 2 int main(){
| ^
a.cc:10:2: error: expected unqualified-id before numeric constant
10 | 10
| ^~
|
s932394565
|
p00000
|
C++
|
#include <stdio.h>
int main(void){
|
a.cc: In function 'int main()':
a.cc:3:16: error: expected '}' at end of input
3 | int main(void){
| ~^
|
s570833913
|
p00000
|
C++
|
using System;
class Class1
{
static void Main(string[] args)
{
for (int i = 1; i <= 9; i++)
{
for (int j = 1; j <= 9; j++)
{
Console.WriteLine("{0}x{1}={2}", i, j, i * j);
}
}
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:4:22: error: 'string' has not been declared
4 | static void Main(string[] args)
| ^~~~~~
a.cc:4:31: error: expected ',' or '...' before 'args'
4 | static void Main(string[] args)
| ^~~~
a.cc:14:2: error: expected ';' after class definition
14 | }
| ^
| ;
a.cc: In static member function 'static void Class1::Main(int*)':
a.cc:10:17: error: 'Console' was not declared in this scope
10 | Console.WriteLine("{0}x{1}={2}", i, j, i * j);
| ^~~~~~~
|
s073258495
|
p00000
|
C++
|
include
|
a.cc:1:1: error: 'include' does not name a type
1 | include
| ^~~~~~~
|
s212311766
|
p00000
|
C++
|
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
#include <string>
#include <iostream>
using namespace std;
#define Max 1000005
char a[Max][10];
map<string , int > mp;
map<string , int > mp2;
int mian()
{
int n;
while(scanf("%d",&n)!=EOF)
{
mp.clear();
getchar();
for(int i=0 ; i<2*n-1 ; i++)
{
gets(a);
mp[a[i]]++;
mp2[a[i]]=0;
}
for(int i=0 ; i<2*n-1 ; i++)
{
if(mp2[a[i]]) continue;
if(mp[a[i]]%2==0 )
{
mp2[a[i]]=1;
}
else
{
mp2[a[i]]=1;
cout<<a[i]<<endl;
}
}
}
return 0;
}
|
a.cc: In function 'int mian()':
a.cc:25:22: error: 'gets' was not declared in this scope; did you mean 'getw'?
25 | gets(a);
| ^~~~
| getw
|
s121976721
|
p00000
|
C++
|
#include<iostream> using namespace std; int main() { for(int i(1);i<10;i++) { for(int j(1);j<10;j++) cout<<i<<'*'<<j<<'='<<i*j<<endl; } return 0; }
|
a.cc:1:20: warning: extra tokens at end of #include directive
1 | #include<iostream> using namespace std; int main() { for(int i(1);i<10;i++) { for(int j(1);j<10;j++) cout<<i<<'*'<<j<<'='<<i*j<<endl; } return 0; }
| ^~~~~
/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
|
s337461995
|
p00000
|
C++
|
#include<iostream>
using namespace std;
int main(){
for(i=1;i<=9;i++){
for(j=1;j<=9;j++){
cout<<i<<"x"<<j<<"="<<endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:13: error: 'i' was not declared in this scope
6 | for(i=1;i<=9;i++){
| ^
a.cc:8:21: error: 'j' was not declared in this scope
8 | for(j=1;j<=9;j++){
| ^
|
s525316183
|
p00000
|
C++
|
#include<iostream>
using namespace std;
int main(){
for(i=1;i<=9;i++){
for(j=1;j<=9;j++){
cout<<i<<"x"<<j<<"="<<i*j<<endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:13: error: 'i' was not declared in this scope
6 | for(i=1;i<=9;i++){
| ^
a.cc:8:21: error: 'j' was not declared in this scope
8 | for(j=1;j<=9;j++){
| ^
|
s022487493
|
p00000
|
C++
|
#include <iostream>
using namespace std;
int main(){
for(int i=1;i<10;i++){
for(int j=1;j<10;j++){
cout << i << “x” << j << “=” << i*j << endl;
}
}
}
|
a.cc:7:21: error: extended character “ is not valid in an identifier
7 | cout << i << “x” << j << “=” << i*j << endl;
| ^
a.cc:7:21: error: extended character ” is not valid in an identifier
a.cc:7:33: error: extended character “ is not valid in an identifier
7 | cout << i << “x” << j << “=” << i*j << endl;
| ^
a.cc:7:35: error: extended character ” is not valid in an identifier
7 | cout << i << “x” << j << “=” << i*j << endl;
| ^
a.cc: In function 'int main()':
a.cc:7:21: error: '\U0000201cx\U0000201d' was not declared in this scope
7 | cout << i << “x” << j << “=” << i*j << endl;
| ^~~
a.cc:7:33: error: '\U0000201c' was not declared in this scope
7 | cout << i << “x” << j << “=” << i*j << endl;
| ^
a.cc:7:35: error: '\U0000201d' was not declared in this scope
7 | cout << i << “x” << j << “=” << i*j << endl;
| ^
|
s692301482
|
p00000
|
C++
|
//============================================================================
// Name : 3308.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include<memory.h>
using namespace std;
#define M 200001
#define maxx 2000
#define Max(a, b) a > b ? a : b
#define Min(a, b) a < b ? a : b
#define inf (1 << 29)
struct T {
int u, v, val, next, cost;
} e[M];
int th;
int visit[M], pre[M], dis[M], que[M], g[M], pos[M], map[100][100];
int R, C, n, k, i, j, x, y, op, t, xx, yy, ans;
int dir[8][2] = { { -1, -2 }, { -2, -1 }, { 1, -2 }, { -2, 1 }, { -1, 2 }, { 2,
-1 }, { 1, 2 }, { 2, 1 } };
int tr(int x, int y) {
return (x - 1) * C + y + n;
}
void add(int u, int v, int val, int cost) {
e[th].u = u, e[th].v = v, e[th].val = val, e[th].cost = cost;
e[th].next = g[u], g[u] = th++;
e[th].u = v, e[th].v = u, e[th].val = 0, e[th].cost = -cost;
e[th].next = g[v], g[v] = th++;
}
int spfa(int s, int t, int n) {
int i, v, k;
for (i = 0; i <= n; i++) {
pre[i] = -1, visit[i] = 0;
}
int head, tail;
head = tail = 0;
for (i = 0; i <= n; i++)
dis[i] = inf; //豎よ怙蟆剰エケ逕ィ譌カ霑咎?蠕玲隼謌先ュ」譌?ゥキ
que[tail++] = s, pre[s] = s, dis[s] = 0, visit[s] = 1;
while (head != tail) {
int u = que[head++];
visit[u] = 0;
for (k = g[u]; k != -1; k = e[k].next) {
v = e[k].v;
if (e[k].val > 0 && dis[u] + e[k].cost < dis[v]) //譛?、ァ雍ケ逕ィ?梧アよ怙蟆剰エケ逕ィ譌カ霑咎?逧?隼隨ヲ蜿キ
{
dis[v] = dis[u] + e[k].cost;
pre[v] = u;
pos[v] = k;
if (!visit[v]) {
visit[v] = 1;
que[tail++] = v;
}
}
}
}
if (pre[t] != -1 && dis[t] < inf) //豎よ怙蟆剰エケ逕ィ譌カ霑咎?謾ケ謌薪it[t] < 豁」譌?ゥキ
{
return 1;
}
return 0;
}
int MinCostFlow(int s, int t, int n) {
if (s == t) {
//霑咎?蜈キ菴捺ュ蜀オ蜈キ菴灘?譫撰シ悟ヲよ棡譛蛾刋蜉?霍殳蟆ア荳咲畑?悟ヲよ棡逕ィ謨ー謐ョ荳ュ逧?せ菴應クコs霍殳蟆ア蠕苓?陌? //逶エ謗・霑泌屓譟蝉クェ蛟シ縲ょ凄蛻冱pfa驥檎噪髦溷?莨壽ュサ蠕ェ邇ッ縲? }
int flow = 0, cost = 0;
while (spfa(s, t, n)) {
int u, min = inf;
for (u = t; u != s; u = pre[u]) {
min = Min(min, e[pos[u]].val);
}
flow += min;
cost += dis[t] * min;
for (u = t; u != s; u = pre[u]) {
e[pos[u]].val -= min;
e[pos[u] ^ 1].val += min;
}
}
printf("%d %d\n", flow, cost);
return cost;
}
int main() {
while (scanf("%d%d%d%d", &R, &C, &n, &k) != EOF) {
memset(g, -1, sizeof(g));
th = 0;
add(0, n + R * C + 1, k, 0);
for (i = 1; i <= n; i++)
add(n + R * C + 1, i, 1, 0);
for (i = 1; i <= R; i++)
for (j = 1; j <= C; j++)
scanf("%d", &map[i][j]);
for (i = 1; i <= n; i++) {
scanf("%d%d%d", &x, &y, &op);
add(i, tr(x, y), 1, 0);
for (t = 0; t < 8; t++) {
xx = x + dir[t][0];
yy = y + dir[t][1];
if (op == 1) {
add(tr(x, y), tr(xx, yy), 1, map[x][y] * map[xx][yy]);
}
if (op == 2) {
add(tr(x, y), tr(xx, yy), 1, map[x][y] + map[xx][yy]);
}
if (op == 3) {
add(tr(x, y), tr(xx, yy), 1, max(map[x][y], map[xx][yy]));
}
}
}
for (i = 1; i <= R; i++)
for (j = 1; j <= C; j++)
add(tr(i, j), n + R * C + 2, 1, 0);
ans = MinCostFlow(0, n + R * C + 2, n + R * C + 3);
printf("%d\n", ans);
}
return 0;
}
|
a.cc: In function 'int MinCostFlow(int, int, int)':
a.cc:88:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
88 | int main() {
| ^~
a.cc:88:9: note: remove parentheses to default-initialize a variable
88 | int main() {
| ^~
| --
a.cc:88:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:88:12: error: a function-definition is not allowed here before '{' token
88 | int main() {
| ^
a.cc:122:2: error: expected '}' at end of input
122 | }
| ^
a.cc:69:38: note: to match this '{'
69 | int MinCostFlow(int s, int t, int n) {
| ^
a.cc:122:2: warning: control reaches end of non-void function [-Wreturn-type]
122 | }
| ^
|
s899220705
|
p00000
|
C++
|
(1..9).each do |i|
(1..9).each do |j|
puts "#{i}x#{j}=#{i*j}"
end
end
|
a.cc:1:2: error: too many decimal points in number
1 | (1..9).each do |i|
| ^~~~
a.cc:2:4: error: too many decimal points in number
2 | (1..9).each do |j|
| ^~~~
a.cc:1:2: error: expected unqualified-id before numeric constant
1 | (1..9).each do |i|
| ^~~~
a.cc:1:2: error: expected ')' before numeric constant
1 | (1..9).each do |i|
| ~^~~~
| )
|
s034281709
|
p00000
|
C++
|
class Main{
public static void main(String[] a){
for(int a=1;a<=9;a++) {
for(int b=1;b <= 9;b++) {
System.out.println(a + "x" + b + "=" + a*b);
}
}
|
a.cc:2:11: error: expected ':' before 'static'
2 | public static void main(String[] a){
| ^~~~~~~
| :
a.cc:2:29: error: 'String' has not been declared
2 | public static void main(String[] a){
| ^~~~~~
a.cc:2:38: error: expected ',' or '...' before 'a'
2 | public static void main(String[] a){
| ^
a.cc:7:2: error: expected '}' at end of input
7 | }
| ^
a.cc:1:11: note: to match this '{'
1 | class Main{
| ^
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:17: error: 'System' was not declared in this scope
5 | System.out.println(a + "x" + b + "=" + a*b);
| ^~~~~~
a.cc:5:48: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
5 | System.out.println(a + "x" + b + "=" + a*b);
| ~~~~~~~~~~~ ^ ~~~
| | |
| | const char [2]
| const char*
a.cc:7:2: error: expected '}' at end of input
7 | }
| ^
a.cc:2:40: note: to match this '{'
2 | public static void main(String[] a){
| ^
a.cc: At global scope:
a.cc:7:2: error: expected unqualified-id at end of input
7 | }
| ^
|
s989885366
|
p00000
|
C++
|
i = 1
k = 1
while i < 10
while k < 10
t = i * k
puts "#{i}x#{k}=#{t}"
k = k + 1
end
i = i + 1
k = 1
end
|
a.cc:1:1: error: 'i' does not name a type
1 | i = 1
| ^
|
s010898484
|
p00000
|
C++
|
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<cstdlib>
using namespace std;
//#ifdef __int64
typedef __int64 LL;
//#else
//typedef long long LL;
//#endif
typedef double db;
const int N = 200015;
const int INF = ~0u>>2;
char s[N],str[2*N];
int len[2*N];
inline int manager(){
int i;
str[0] = '$';
for(i = 0;; i ++){
str[2*i+1] = '#',str[2*i+2] = s[i];
if(!s[i]) break;
}
int id,mx = 0;
for(i = 1;str[i]; i ++){
if(mx>i) len[i] = min(len[2*id-i],mx-i);
else len[i] = 1;
while(str[i-len[i]]==str[i+len[i]]) len[i] ++;
if(i+len[i] > mx){
mx = i + len[i];
id = i;
}
}
mx = 0;
for(int i = 1;str[i];i++) if(mx < len[i]) mx = len[i];
return mx - 1;
}
int main()
{
//freopen("input.in","r",stdin);
//freopen("output.out","w",stdout);
// while(~scanf("%s",s))
// {
// printf("%d\n",manager());
// }
LL x = 1;
return 0;
}
|
a.cc:9:9: error: '__int64' does not name a type; did you mean '__int64_t'?
9 | typedef __int64 LL;
| ^~~~~~~
| __int64_t
a.cc: In function 'int main()':
a.cc:47:5: error: 'LL' was not declared in this scope
47 | LL x = 1;
| ^~
|
s862331588
|
p00000
|
C++
|
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<cstdlib>
using namespace std;
#ifdef __int64
typedef __int64 LL;
//#else
//typedef long long LL;
#endif
//typedef double db;
//const int N = 200015;
//const int INF = ~0u>>2;
//char s[N],str[2*N];
//int len[2*N];
//inline int manager(){
// int i;
// str[0] = '$';
// for(i = 0;; i ++){
// str[2*i+1] = '#',str[2*i+2] = s[i];
// if(!s[i]) break;
// }
// int id,mx = 0;
// for(i = 1;str[i]; i ++){
// if(mx>i) len[i] = min(len[2*id-i],mx-i);
// else len[i] = 1;
// while(str[i-len[i]]==str[i+len[i]]) len[i] ++;
// if(i+len[i] > mx){
// mx = i + len[i];
// id = i;
// }
// }
// mx = 0;
// for(int i = 1;str[i];i++) if(mx < len[i]) mx = len[i];
// return mx - 1;
//}
int main()
{
//freopen("input.in","r",stdin);
//freopen("output.out","w",stdout);
// while(~scanf("%s",s))
// {
// printf("%d\n",manager());
// }
for(LL i=1;i<=9;i++)
for(LL j=1;j<=9;j++)
cout<<i<<"x"<<j<<"="<<i*j<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:48:9: error: 'LL' was not declared in this scope
48 | for(LL i=1;i<=9;i++)
| ^~
a.cc:48:16: error: 'i' was not declared in this scope
48 | for(LL i=1;i<=9;i++)
| ^
a.cc:49:15: error: expected ';' before 'j'
49 | for(LL j=1;j<=9;j++)
| ^~
| ;
a.cc:49:20: error: 'j' was not declared in this scope; did you mean 'jn'?
49 | for(LL j=1;j<=9;j++)
| ^
| jn
|
s670021516
|
p00000
|
C++
|
#include "StdAfx.h"
#include<iostream>
using namespace std;
int main()
{
for(int m=1;m<=9;m++)
{
cout<<m<<"x"<<m<<"="<<m*m<<endl;
}
system("pause");
return 0;
}
|
a.cc:1:10: fatal error: StdAfx.h: No such file or directory
1 | #include "StdAfx.h"
| ^~~~~~~~~~
compilation terminated.
|
s263955253
|
p00000
|
C++
|
i;main(j){for(i=1;i<=9;i++)for(j=1;j<=9;j++)printf("%dx%d=%d\n",i,j,i*j);}
|
a.cc:1:1: error: 'i' does not name a type
1 | i;main(j){for(i=1;i<=9;i++)for(j=1;j<=9;j++)printf("%dx%d=%d\n",i,j,i*j);}
| ^
a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token
1 | i;main(j){for(i=1;i<=9;i++)for(j=1;j<=9;j++)printf("%dx%d=%d\n",i,j,i*j);}
| ^
|
s372489515
|
p00000
|
C++
|
#include <iostream>
int main(){
for(int i=1;i<10;++i){
for(int j=1;j<10;++j){
std::cout<<i<<'x'<<j<<'='<<i*j<<endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:57: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
6 | std::cout<<i<<'x'<<j<<'='<<i*j<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s467371635
|
p00000
|
C++
|
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
using namespace std;
#define MAXN 500010
struct _node
{
int u,v,w;
bool operator < (const _node &b) const
{
return w<b.w;
}
}no[MAXN];
struct _query
{
int t,id;
bool operator < (const _query &b) const
{
return t<b.t;
}
}query[MAXN];
int fa[MAXN],ran[MAXN],ans[MAXN],sum;
int findfa(int n)
{
if(fa[n]!=n)
fa[n]=findfa(fa[n]);
return fa[n];
}
inline void mul(int a,int b)
{
a=findfa(a),b=findfa(b);
int af=ran[a],bf=ran[b];
if(a==b) return ;
if(af<bf) swap(a,b);
fa[b]=a,ran[a]+=ran[b];
sum-=af*(af-1),sum-=bf*(bf-1);
sum+=ran[a]*(ran[a]-1);
}
int main()
{
//freopen(\\\"/home/moor/Code/input\\\",\\\"r\\\",stdin);
int n,m,q;
while(scanf(\\\"%d%d\\\",&n,&m)==2)
{
for(int i=0;i<m;++i)
scanf(\\\"%d%d%d\\\",&no[i].u,&no[i].v,&no[i].w),++no[i].u,++no[i].v;
for(int i=1;i<=n;++i) fa[i]=i,ran[i]=1;
sort(no,no+m);
scanf(\\\"%d\\\",&q);
for(int i=0;i<q;++i) scanf(\\\"%d\\\",&query[i].t),query[i].id=i;
sort(query,query+q);
sum=0;
int l=0;
for(int i=0;i<q;++i)
{
while(l<m&&no[l].w<query[i].t)
mul(no[l].u,no[l].v),++l;
ans[query[i].id]=sum;
}
while(l<m) mul(no[l].u,no[l].v),++l;
for(int i=0;i<q;++i) printf(\\\"%d\\\\n\\\",sum-ans[i]);
}
return 0;
}
|
a.cc:44:17: error: stray '\' in program
44 | while(scanf(\\\"%d%d\\\",&n,&m)==2)
| ^
a.cc:44:18: error: stray '\' in program
44 | while(scanf(\\\"%d%d\\\",&n,&m)==2)
| ^
a.cc:44:19: error: stray '\' in program
44 | while(scanf(\\\"%d%d\\\",&n,&m)==2)
| ^
a.cc:44:20: warning: missing terminating " character
44 | while(scanf(\\\"%d%d\\\",&n,&m)==2)
| ^
a.cc:44:20: error: missing terminating " character
44 | while(scanf(\\\"%d%d\\\",&n,&m)==2)
| ^~~~~~~~~~~~~~~~~~~~
a.cc:47:19: error: stray '\' in program
47 | scanf(\\\"%d%d%d\\\",&no[i].u,&no[i].v,&no[i].w),++no[i].u,++no[i].v;
| ^
a.cc:47:20: error: stray '\' in program
47 | scanf(\\\"%d%d%d\\\",&no[i].u,&no[i].v,&no[i].w),++no[i].u,++no[i].v;
| ^
a.cc:47:21: error: stray '\' in program
47 | scanf(\\\"%d%d%d\\\",&no[i].u,&no[i].v,&no[i].w),++no[i].u,++no[i].v;
| ^
a.cc:47:22: warning: missing terminating " character
47 | scanf(\\\"%d%d%d\\\",&no[i].u,&no[i].v,&no[i].w),++no[i].u,++no[i].v;
| ^
a.cc:47:22: error: missing terminating " character
47 | scanf(\\\"%d%d%d\\\",&no[i].u,&no[i].v,&no[i].w),++no[i].u,++no[i].v;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:50:15: error: stray '\' in program
50 | scanf(\\\"%d\\\",&q);
| ^
a.cc:50:16: error: stray '\' in program
50 | scanf(\\\"%d\\\",&q);
| ^
a.cc:50:17: error: stray '\' in program
50 | scanf(\\\"%d\\\",&q);
| ^
a.cc:50:18: warning: missing terminating " character
50 | scanf(\\\"%d\\\",&q);
| ^
a.cc:50:18: error: missing terminating " character
50 | scanf(\\\"%d\\\",&q);
| ^~~~~~~~~~~~
a.cc:51:39: error: stray '\' in program
51 | for(int i=0;i<q;++i) scanf(\\\"%d\\\",&query[i].t),query[i].id=i;
| ^
a.cc:51:40: error: stray '\' in program
51 | for(int i=0;i<q;++i) scanf(\\\"%d\\\",&query[i].t),query[i].id=i;
| ^
a.cc:51:41: error: stray '\' in program
51 | for(int i=0;i<q;++i) scanf(\\\"%d\\\",&query[i].t),query[i].id=i;
| ^
a.cc:51:42: warning: missing terminating " character
51 | for(int i=0;i<q;++i) scanf(\\\"%d\\\",&query[i].t),query[i].id=i;
| ^
a.cc:51:42: error: missing terminating " character
51 | for(int i=0;i<q;++i) scanf(\\\"%d\\\",&query[i].t),query[i].id=i;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:62:40: error: stray '\' in program
62 | for(int i=0;i<q;++i) printf(\\\"%d\\\\n\\\",sum-ans[i]);
| ^
a.cc:62:41: error: stray '\' in program
62 | for(int i=0;i<q;++i) printf(\\\"%d\\\\n\\\",sum-ans[i]);
| ^
a.cc:62:42: error: stray '\' in program
62 | for(int i=0;i<q;++i) printf(\\\"%d\\\\n\\\",sum-ans[i]);
| ^
a.cc:62:43: warning: missing terminating " character
62 | for(int i=0;i<q;++i) printf(\\\"%d\\\\n\\\",sum-ans[i]);
| ^
a.cc:62:43: error: missing terminating " character
62 | for(int i=0;i<q;++i) printf(\\\"%d\\\\n\\\",sum-ans[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:46:9: error: expected primary-expression before 'for'
46 | for(int i=0;i<m;++i)
| ^~~
a.cc:46:9: error: expected '}' before 'for'
a.cc:45:5: note: to match this '{'
45 | {
| ^
a.cc:45:6: error: expected ')' before 'for'
45 | {
| ^
| )
46 | for(int i=0;i<m;++i)
| ~~~
a.cc:44:16: note: to match this '('
44 | while(scanf(\\\"%d%d\\\",&n,&m)==2)
| ^
a.cc:46:20: error: expected ')' before ';' token
46 | for(int i=0;i<m;++i)
| ^
| )
a.cc:44:10: note: to match this '('
44 | while(scanf(\\\"%d%d\\\",&n,&m)==2)
| ^
a.cc:46:21: error: 'i' was not declared in this scope
46 | for(int i=0;i<m;++i)
| ^
a.cc:51:9: error: expected primary-expression before 'for'
51 | for(int i=0;i<q;++i) scanf(\\\"%d\\\",&query[i].t),query[i].id=i;
| ^~~
a.cc:63:5: error: expected primary-expression before '}' token
63 | }
| ^
a.cc: At global scope:
a.cc:64:5: error: expected unqualified-id before 'return'
64 | return 0;
| ^~~~~~
a.cc:65:1: error: expected declaration before '}' token
65 | }
| ^
|
s991569545
|
p00000
|
C++
|
test
|
a.cc:1:1: error: 'test' does not name a type
1 | test
| ^~~~
|
s459426793
|
p00000
|
C++
|
#omc;ide <stdop.k?mr ,aイン(){オdpe()omro1;o1^;o++={
fpr)omt k~-0;lk<;k++{@炉mtg)”%fc%f&f¥。#、、お、l、おz:l=;}}tりぃtm−;}
|
a.cc:1:2: error: invalid preprocessing directive #omc
1 | #omc;ide <stdop.k?mr ,aイン(){オdpe()omro1;o1^;o++={
| ^~~
a.cc:2:27: error: stray '@' in program
2 | fpr)omt k~-0;lk<;k++{@炉mtg)”%fc%f&f¥。#、、お、l、おz:l=;}}tりぃtm−;}
| ^
a.cc:2:28: error: extended character ” is not valid in an identifier
2 | fpr)omt k~-0;lk<;k++{@炉mtg)”%fc%f&f¥。#、、お、l、おz:l=;}}tりぃtm−;}
| ^
a.cc:2:28: error: extended character ¥ is not valid in an identifier
a.cc:2:28: error: extended character 。 is not valid in an identifier
a.cc:2:28: error: extended character 、 is not valid in an identifier
a.cc:2:28: error: extended character 、 is not valid in an identifier
a.cc:2:28: error: extended character 、 is not valid in an identifier
a.cc:2:28: error: extended character 、 is not valid in an identifier
a.cc:2:28: error: extended character − is not valid in an identifier
a.cc:2:1: error: 'fpr' does not name a type
2 | fpr)omt k~-0;lk<;k++{@炉mtg)”%fc%f&f¥。#、、お、l、おz:l=;}}tりぃtm−;}
| ^~~
a.cc:2:14: error: 'lk' does not name a type
2 | fpr)omt k~-0;lk<;k++{@炉mtg)”%fc%f&f¥。#、、お、l、おz:l=;}}tりぃtm−;}
| ^~
|
s354819052
|
p00000
|
C++
|
#include <iostream>
using namespace std;
int main(void){
for(int a = 1; a <= 9; a ++)
for(int b = 1; b <= 9; b ++)
cout << a << "x" << b << "=" << a * b << endl;
return -;
}
|
a.cc: In function 'int main()':
a.cc:10:11: error: expected primary-expression before ';' token
10 | return -;
| ^
|
s375947484
|
p00000
|
C++
|
#include <iostream>
using namespace std;
int main(){
for(int i = 1; i <=9; i++)
for(int j = 1; j <= 9; j++)
cout << i << "x" << j << "=
" << i * j << endl;
return 0;
}
|
a.cc:8:34: warning: missing terminating " character
8 | cout << i << "x" << j << "=
| ^
a.cc:8:34: error: missing terminating " character
8 | cout << i << "x" << j << "=
| ^~
a.cc:9:1: warning: missing terminating " character
9 | " << i * j << endl;
| ^
a.cc:9:1: error: missing terminating " character
9 | " << i * j << endl;
| ^~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:10:5: error: expected primary-expression before 'return'
10 | return 0;
| ^~~~~~
|
s940618234
|
p00000
|
C++
|
縲先怙蟆乗?蠖「蝗セ縲粗dmonds邂玲ウ?驍サ謗・髦オ蠖「蠑?螟肴揩蠎ヲO(n3), 霑泌屓譛?ー冗函謌先?逧?柄蠎ヲ,譫??螟ア雍・霑?蝗櫁エ溷?,莨??蝗セ逧?、ァ蟆熟蜥碁そ謗・髦オmat,荳咲嶌驍サ轤ケ霎ケ譚ナnf,蜿ッ譖エ謾ケ霎ケ譚?噪邀サ蝙?pre[]霑泌屓譬醍噪譫??,逕ィ
辷カ扈鍋せ陦ィ遉コ,莨??譌カpre[]謨ー扈?ク?峺,逕ィ-1譬??貅千せ.
[豕ィ諢従豕ィ諢城怙隕∝?蛻、譁ュ譬ケ譏ッ蜷ヲ蜿ッ莉・蛻ー霎セ莨??蝗セ逧?ッ丈ク?クェ鬘カ轤ケ蜀堺スソ逕ィ
[萓矩「肋 UVA 11865 Stream My Contest
#include <string.h>
#define MAXN 120
#define inf 1000000000
typedef int elem_t;
elem_t edmonds(int n,elem_t mat[][MAXN*2],int* pre){
elem_t ret=0;
int c[MAXN*2][MAXN*2],l[MAXN*2],p[MAXN*2],m=n,t,i,j,k;
for (i=0;i<n;l[i]=i,i++);
do{
memset(c,0,sizeof(c)),memset(p,0xff,sizeof(p));
for (t=m,i=0;i<m;c[i][i]=1,i++);
for (i=0;i<t;i++)
if (l[i]==i&&pre[i]!=-1){
for (j=0;j<m;j++)
if (l[j]==j&&i!=j&&mat[j][i]<inf&&
(p[i]==-1||mat[j][i]<mat[p[i]][i]))
p[i]=j;
if ((pre[i]=p[i])==-1)
return -1;
if (c[i][p[i]]){
for (j=0;j<=m;mat[j][m]=mat[m][j]=inf,j++);
for (k=i;l[k]!=m;l[k]=m,k=p[k])
for (j=0;j<m;j++)
if (l[j]==j){
if (mat[j][k]-mat[p[k]][k]<mat[j][m])
mat[j][m]=mat[j][k]-mat[p[k]][k];
if (mat[k][j]<mat[m][j])
mat[m][j]=mat[k][j];
}
c[m][m]=1,l[m]=m,m++;
}
for (j=0;j<m;j++)
if (c[i][j])
for (k=p[i];k!=-1&&l[k]==k;c[k][j]=1,k=p[k]);
}
}
while (t<m);
for (;m-->n;pre[k]=pre[m])
for (i=0;i<m;i++)
if (l[i]==m){
for (j=0;j<m;j++)
if (pre[j]==m&&mat[i][j]==mat[m][j])
pre[j]=i;
if (mat[pre[m]][m]==mat[pre[m]][i]-mat[pre[i]][i])
k=i;
}
for (i=0;i<n;i++)
if (pre[i]!=-1)
ret+=mat[pre[i]][i];
return ret;
}
|
a.cc:1:12: error: extended character 「 is not valid in an identifier
1 | 縲先怙蟆乗?蠖「蝗セ縲粗dmonds邂玲ウ?驍サ謗・髦オ蠖「蠑?螟肴揩蠎ヲO(n3), 霑泌屓譛?ー冗函謌先?逧?柄蠎ヲ,譫??螟ア雍・霑?蝗櫁エ溷?,莨??蝗セ逧?、ァ蟆熟蜥碁そ謗・髦オmat,荳咲嶌驍サ轤ケ霎ケ譚ナnf,蜿ッ譖エ謾ケ霎ケ譚?噪邀サ蝙?pre[]霑泌屓譬醍噪譫??,逕ィ
| ^
a.cc:1:37: error: extended character 「 is not valid in an identifier
1 | 縲先怙蟆乗?蠖「蝗セ縲粗dmonds邂玲ウ?驍サ謗・髦オ蠖「蠑?螟肴揩蠎ヲO(n3), 霑泌屓譛?ー冗函謌先?逧?柄蠎ヲ,譫??螟ア雍・霑?蝗櫁エ溷?,莨??蝗セ逧?、ァ蟆熟蜥碁そ謗・髦オmat,荳咲嶌驍サ轤ケ霎ケ譚ナnf,蜿ッ譖エ謾ケ霎ケ譚?噪邀サ蝙?pre[]霑泌屓譬醍噪譫??,逕ィ
| ^
a.cc:1:139: error: extended character 、 is not valid in an identifier
1 | 縲先怙蟆乗?蠖「蝗セ縲粗dmonds邂玲ウ?驍サ謗・髦オ蠖「蠑?螟肴揩蠎ヲO(n3), 霑泌屓譛?ー冗函謌先?逧?柄蠎ヲ,譫??螟ア雍・霑?蝗櫁エ溷?,莨??蝗セ逧?、ァ蟆熟蜥碁そ謗・髦オmat,荳咲嶌驍サ轤ケ霎ケ譚ナnf,蜿ッ譖エ謾ケ霎ケ譚?噪邀サ蝙?pre[]霑泌屓譬醍噪譫??,逕ィ
| ^
a.cc:3:2: error: extended character ∝ is not valid in an identifier
3 | [豕ィ諢従豕ィ諢城怙隕∝?蛻、譁ュ譬ケ譏ッ蜷ヲ蜿ッ莉・蛻ー霎セ莨??蝗セ逧?ッ丈ク?クェ鬘カ轤ケ蜀堺スソ逕ィ
| ^
a.cc:3:24: error: extended character 、 is not valid in an identifier
3 | [豕ィ諢従豕ィ諢城怙隕∝?蛻、譁ュ譬ケ譏ッ蜷ヲ蜿ッ莉・蛻ー霎セ莨??蝗セ逧?ッ丈ク?クェ鬘カ轤ケ蜀堺スソ逕ィ
| ^
a.cc:4:2: error: extended character 「 is not valid in an identifier
4 | [萓矩「肋 UVA 11865 Stream My Contest
| ^
a.cc:1:1: error: '\U00007e32\U00005148\U00006019\U000087c6\U00004e57' does not name a type
1 | 縲先怙蟆乗?蠖「蝗セ縲粗dmonds邂玲ウ?驍サ謗・髦オ蠖「蠑?螟肴揩蠎ヲO(n3), 霑泌屓譛?ー冗函謌先?逧?柄蠎ヲ,譫??螟ア雍・霑?蝗櫁エ溷?,莨??蝗セ逧?、ァ蟆熟蜥碁そ謗・髦オmat,荳咲嶌驍サ轤ケ霎ケ譚ナnf,蜿ッ譖エ謾ケ霎ケ譚?噪邀サ蝙?pre[]霑泌屓譬醍噪譫??,逕ィ
| ^~~~~~~~~~
a.cc: In function 'elem_t edmonds(int, elem_t (*)[240], int*)':
a.cc:14:1: error: 'memset' was not declared in this scope
14 | memset(c,0,sizeof(c)),memset(p,0xff,sizeof(p));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <string.h>
+++ |+#include <cstring>
6 | #define MAXN 120
|
s061740250
|
p00000
|
C++
|
#include <stdio.h>
int main()
{
for(int i=1; i<=9; i++)
for(int j=1; j<=9; j++)
}
|
a.cc: In function 'int main()':
a.cc:8:1: error: expected primary-expression before '}' token
8 | }
| ^
|
s649017839
|
p00000
|
C++
|
#include <stdio.h>
int main()
{
for(i=1;i<10;i++)
for(j=1;j<10;j++)
printf("%dx%d=%d",i,j,i*j);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:4:10: error: 'i' was not declared in this scope
4 | for(i=1;i<10;i++)
| ^
a.cc:5:15: error: 'j' was not declared in this scope
5 | for(j=1;j<10;j++)
| ^
|
s566318465
|
p00000
|
C++
|
#include "iostream"
#include "cstring"
#include "cstdio"
#include "set"
#include "map"
#include "algorithm"
#include "vector"
#include "queue"
#include "cassert"
using namespace std;
#define F first
#define S second
#define MP make_pair
#define PB push_back
typedef long long ll;
typedef pair<int, int> PII;
const int N = 100010;
vector<PII> e[N];
vector<int> node;
int balence[N], visit[N], size[N];
void dfs(int x, int fa)
{
size[x] = 1;
balence[x] = 0;
for(int i = 0; i < e[x].size(); ++ i){
int u = e[x][i].F;
if(u == fa || visit[u]) continue;
dfs(u);
size[x] += size[u];
balence[x] = max(balence[x], size[u]);
}
node.PB(x);
}
int GetRoot(int x)
{
dfs(x, -1);
node.clear();
int total = size[x];
int root = node[0];
int val = max(balence[root], total - size[root]);
for(int i = 1; i < node.size(); ++ i){
int u = node[i];
int tmp = max(balence[u], total - size[u]);
if(tmp < val){
val = tmp;
root = u;
}
}
return root;
}
long long ans = 0;
map<int, int> mp;
void dfs2(int x, int pa, int depth)
{
mp[depth] ++;
void solve(int x)
{
visit[x] = 1;
int root = GetRoot(x);
dfs2(root, -1, 0);
for(int i = 0; i < e[x].size(); ++ i){
int u = e[x][i];
if(!visit[u]){
solve(u);
}
}
}
int main(void)
{
int n, x, y, w;
scanf("%d",&n);
for(int i = 1; i < n; ++ i){
cin >> x >> y >> w;
e[x].PB(MP(y, w));
e[y].PB(MP(x, w));
}
ans = 0;
solve(1);
cout << ans << endl;
return 0;
}
|
a.cc: In function 'void dfs(int, int)':
a.cc:24:9: error: reference to 'size' is ambiguous
24 | size[x] = 1;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:21:27: note: 'int size [100010]'
21 | int balence[N], visit[N], size[N];
| ^~~~
a.cc:29:20: error: too few arguments to function 'void dfs(int, int)'
29 | dfs(u);
| ~~~^~~
a.cc:22:6: note: declared here
22 | void dfs(int x, int fa)
| ^~~
a.cc:30:17: error: reference to 'size' is ambiguous
30 | size[x] += size[u];
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:21:27: note: 'int size [100010]'
21 | int balence[N], visit[N], size[N];
| ^~~~
a.cc:30:28: error: reference to 'size' is ambiguous
30 | size[x] += size[u];
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:21:27: note: 'int size [100010]'
21 | int balence[N], visit[N], size[N];
| ^~~~
a.cc:31:46: error: reference to 'size' is ambiguous
31 | balence[x] = max(balence[x], size[u]);
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:21:27: note: 'int size [100010]'
21 | int balence[N], visit[N], size[N];
| ^~~~
a.cc: In function 'int GetRoot(int)':
a.cc:40:21: error: reference to 'size' is ambiguous
40 | int total = size[x];
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:21:27: note: 'int size [100010]'
21 | int balence[N], visit[N], size[N];
| ^~~~
a.cc:42:46: error: reference to 'size' is ambiguous
42 | int val = max(balence[root], total - size[root]);
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:21:27: note: 'int size [100010]'
21 | int balence[N], visit[N], size[N];
| ^~~~
a.cc:45:51: error: reference to 'size' is ambiguous
45 | int tmp = max(balence[u], total - size[u]);
| ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
272 | size(const _Tp (&)[_Nm]) noexcept
| ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
262 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))
| ^~~~
a.cc:21:27: note: 'int size [100010]'
21 | int balence[N], visit[N], size[N];
| ^~~~
a.cc: In function 'void dfs2(int, int, int)':
a.cc:60:1: error: a function-definition is not allowed here before '{' token
60 | {
| ^
a.cc:72:1: error: a function-definition is not allowed here before '{' token
72 | {
| ^
a.cc:84:2: error: expected '}' at end of input
84 | }
| ^
a.cc:56:1: note: to match this '{'
56 | {
| ^
|
s250086117
|
p00000
|
C++
|
#include <stdio.h>
int main(void)
{
int i;
for j;
for(i = 1; i < 10; i++){
for(j = 1; j < 10; j++){
printf("%dx%d=%d\n", i, j, i*j);
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:13: error: expected '(' before 'j'
6 | for j;
| ^
| (
a.cc:6:13: error: 'j' was not declared in this scope
a.cc:8:9: error: expected primary-expression before 'for'
8 | for(i = 1; i < 10; i++){
| ^~~
a.cc:6:15: error: expected ';' before 'for'
6 | for j;
| ^
| ;
7 |
8 | for(i = 1; i < 10; i++){
| ~~~
a.cc:8:9: error: expected primary-expression before 'for'
8 | for(i = 1; i < 10; i++){
| ^~~
a.cc:6:15: error: expected ')' before 'for'
6 | for j;
| ~ ^
| )
7 |
8 | for(i = 1; i < 10; i++){
| ~~~
|
s512069484
|
p00000
|
C++
|
<?php
for(i=0;i<81;++i){a=i/9+1;b=i%9+1;print a.'x'.b.'='.(a*b).'\n';}
?>
|
a.cc:1:1: error: expected unqualified-id before '<' token
1 | <?php
| ^
a.cc:2:9: error: 'i' does not name a type
2 | for(i=0;i<81;++i){a=i/9+1;b=i%9+1;print a.'x'.b.'='.(a*b).'\n';}
| ^
a.cc:2:14: error: expected unqualified-id before '++' token
2 | for(i=0;i<81;++i){a=i/9+1;b=i%9+1;print a.'x'.b.'='.(a*b).'\n';}
| ^~
a.cc:3:1: error: expected unqualified-id before '?' token
3 | ?>
| ^
|
s936111927
|
p00000
|
C++
|
#include<stdio.h>
int main(){
for(int i=0;i<10;i++)
for(int j=0;j<10;j++)
cout<<i<<"+"<<j<<"="<<j*i<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:1: error: 'cout' was not declared in this scope
8 | cout<<i<<"+"<<j<<"="<<j*i<<endl;
| ^~~~
a.cc:8:28: error: 'endl' was not declared in this scope
8 | cout<<i<<"+"<<j<<"="<<j*i<<endl;
| ^~~~
|
s675409863
|
p00000
|
C++
|
#include <iostream>
using namespace std;
int main(void)
{
for( int i=0; i<10; ++i)
{
for( int j=0; j<10; ++j )
{
cout << i << "x" << j << "=" << i*j << endl;
}
}
return 0;
}
|
a.cc:11:20: error: extended character is not valid in an identifier
11 | cout << i << "x" << j << "=" << i*j << endl;
| ^
a.cc: In function 'int main()':
a.cc:11:20: error: unable to find string literal operator 'operator""\U00003000' with 'const char [2]', 'long unsigned int' arguments
11 | cout << i << "x" << j << "=" << i*j << endl;
| ^~~~~
|
s033239023
|
p00000
|
C++
|
#include<iostream>
using namespace std;
int main(){
int i;
for(int x=1;x<10;x++){
i=i*i
cout << i;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'cout'
7 | i=i*i
| ^
| ;
8 | cout << i;
| ~~~~
|
s445871716
|
p00000
|
C++
|
#include <iostream>
using namespace std;
int main(void){
int x,y;
for(x<10;x++){
for(y<10;y++){
cout <<x*y;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before ')' token
6 | for(x<10;x++){
| ^
| ;
a.cc:7:16: error: expected ';' before ')' token
7 | for(y<10;y++){
| ^
| ;
|
s653715506
|
p00000
|
C++
|
#include<stdio.h>
int main(){
for(
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:5: error: expected primary-expression before 'return'
8 | return 0;
| ^~~~~~
a.cc:9:1: error: expected primary-expression before '}' token
9 | }
| ^
a.cc:8:14: error: expected ';' before '}' token
8 | return 0;
| ^
| ;
9 | }
| ~
a.cc:9:1: error: expected primary-expression before '}' token
9 | }
| ^
a.cc:8:14: error: expected ')' before '}' token
8 | return 0;
| ^
| )
9 | }
| ~
a.cc:6:4: note: to match this '('
6 | for(
| ^
a.cc:9:1: error: expected primary-expression before '}' token
9 | }
| ^
|
s658690951
|
p00000
|
C++
|
#include<stdio.h>
int main(){
int a,b,c;
for(a=1;a<=9;a++){
for(b=1;b<=9;b++){
c=a*b;
printf("%dx%d=%d,a,b,c);
}
}
return 0;
}
|
a.cc:8:32: warning: missing terminating " character
8 | printf("%dx%d=%d,a,b,c);
| ^
a.cc:8:32: error: missing terminating " character
8 | printf("%dx%d=%d,a,b,c);
| ^~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:17: error: expected primary-expression before '}' token
9 | }
| ^
|
s264347266
|
p00000
|
C++
|
#include<stdio.h>
int main(void){
int a,b,c;
for(a=1;a<=9;a++){
for(b=1;b<=9;b++){
c=a*b;
printf("%dx%d=%d,a,b,c);
}
}
return 0;
}
|
a.cc:8:32: warning: missing terminating " character
8 | printf("%dx%d=%d,a,b,c);
| ^
a.cc:8:32: error: missing terminating " character
8 | printf("%dx%d=%d,a,b,c);
| ^~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:17: error: expected primary-expression before '}' token
9 | }
| ^
|
s816795942
|
p00000
|
C++
|
#iinclude <iostream>
int main()
{
for(int i=1;i<=9;i++)
{
for(int j=1;j<=9;i++)
{
cout << i << 'x' << j << '=' << i*j << endl;
}
}
return 0;
}
|
a.cc:1:2: error: invalid preprocessing directive #iinclude; did you mean #include?
1 | #iinclude <iostream>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:8:1: error: 'cout' was not declared in this scope
8 | cout << i << 'x' << j << '=' << i*j << endl;
| ^~~~
a.cc:8:40: error: 'endl' was not declared in this scope
8 | cout << i << 'x' << j << '=' << i*j << endl;
| ^~~~
|
s705394640
|
p00000
|
C++
|
#iinclude <iostream>
using namespace std;
int main()
{
for(int i=1;i<=9;i++)
{
for(int j=1;j<=9;i++)
{
cout << i << 'x' << j << '=' << i*j << endl;
}
}
return 0;
}
|
a.cc:1:2: error: invalid preprocessing directive #iinclude; did you mean #include?
1 | #iinclude <iostream>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:9:1: error: 'cout' was not declared in this scope
9 | cout << i << 'x' << j << '=' << i*j << endl;
| ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #iinclude <iostream>
a.cc:9:40: error: 'endl' was not declared in this scope
9 | cout << i << 'x' << j << '=' << i*j << endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #iinclude <iostream>
|
s509857851
|
p00000
|
C++
|
#iinclude <iostream>
using namespace std;
int main()
{
int i,j;
for(i=1;i<=9;i++)
{
for(j=1;j<=9;i++)
{
cout << i << 'x' << j << '=' << i*j << endl;
}
}
return 0;
}
|
a.cc:1:2: error: invalid preprocessing directive #iinclude; did you mean #include?
1 | #iinclude <iostream>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:10:1: error: 'cout' was not declared in this scope
10 | cout << i << 'x' << j << '=' << i*j << endl;
| ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #iinclude <iostream>
a.cc:10:40: error: 'endl' was not declared in this scope
10 | cout << i << 'x' << j << '=' << i*j << endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #iinclude <iostream>
|
s607009486
|
p00000
|
C++
|
class Main {
public static void main(String[] args) {
for (int i = 1; i <= 9; i++)
for (int j = 1; j <= 9; j++)
System.out.println(i + "x" + j + "=" + (i * j));
}
}
|
a.cc:2:15: error: expected ':' before 'static'
2 | public static void main(String[] args) {
| ^~~~~~~
| :
a.cc:2:33: error: 'String' has not been declared
2 | public static void main(String[] args) {
| ^~~~~~
a.cc:2:42: error: expected ',' or '...' before 'args'
2 | public static void main(String[] args) {
| ^~~~
a.cc:7:2: error: expected ';' after class definition
7 | }
| ^
| ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:33: error: 'System' was not declared in this scope
5 | System.out.println(i + "x" + j + "=" + (i * j));
| ^~~~~~
a.cc:5:64: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
5 | System.out.println(i + "x" + j + "=" + (i * j));
| ~~~~~~~~~~~ ^ ~~~
| | |
| | const char [2]
| const char*
|
s517426525
|
p00000
|
C++
|
public class Main {
public static void main(String[] args) {
for (int i = 1; i <= 9; i++)
for (int j = 1; j <= 9; j++)
System.out.println(i + "x" + j + "=" + (i * j));
}
}
|
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s979068968
|
p00000
|
C++
|
public class Main {
public static void main(String[] args) {
for (int i = 1; i <= 9; i++)
for (int j = 1; j <= 9; j++)
System.out.println(i + "x" + j + "=" + (i * j));
}
}
|
a.cc:1:1: error: expected unqualified-id before 'public'
1 | public class Main {
| ^~~~~~
|
s364571204
|
p00000
|
C++
|
#include <iostream>
using namespace std ;
int main()
{
for(int i = 1 ; i <= 9 ; i ++)
{
for(int j = 1 ; j <= 9 ; j++)
{
cout << i << "x" << j << "=" << i*j ;
}
}
return 0
}
|
a.cc: In function 'int main()':
a.cc:14:9: error: expected ';' before '}' token
14 | return 0
| ^
| ;
15 |
16 | }
| ~
|
s653337299
|
p00000
|
C++
|
#include<iostream>
using namespace std;
int main(){
for(int i=0;i=<9;i++){
for(int j=0;j=<9;j++){
cout << i << 'x' << j << '=' << i*j << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:23: error: expected primary-expression before '<' token
5 | for(int i=0;i=<9;i++){
| ^
a.cc:6:31: error: expected primary-expression before '<' token
6 | for(int j=0;j=<9;j++){
| ^
|
s548023146
|
p00000
|
C++
|
class Main {
public static void main (String[] arge) {
int a,b;
for(a=1;a<=9 ;a++) {
for(b=1;b<=9 ;b++){
System.out.println(a+"x"+b+"="+(a*b));
}
}
}
}
|
a.cc:2:7: error: expected ':' before 'static'
2 | public static void main (String[] arge) {
| ^~~~~~~
| :
a.cc:2:26: error: 'String' has not been declared
2 | public static void main (String[] arge) {
| ^~~~~~
a.cc:2:35: error: expected ',' or '...' before 'arge'
2 | public static void main (String[] arge) {
| ^~~~
a.cc:10:2: error: expected ';' after class definition
10 | }
| ^
| ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:9: error: 'System' was not declared in this scope
6 | System.out.println(a+"x"+b+"="+(a*b));
| ^~~~~~
a.cc:6:35: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
6 | System.out.println(a+"x"+b+"="+(a*b));
| ~~~~~~~^~~~
| | |
| | const char [2]
| const char*
|
s370937478
|
p00000
|
C++
|
#include<iostream>
using namespace std;
int main(){
for(int i=1;i<=9;i++){
for(int j=1;j<=9;j++){
cout << i << "x" << j << "=" << i*j << "\n";);
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:45: error: expected primary-expression before ')' token
7 | cout << i << "x" << j << "=" << i*j << "\n";);
| ^
|
s956052576
|
p00000
|
C++
|
public class QQ
{
public static void main(String[] args)
{
for(int i = 1; i <= 9; ++i){
for(int j = 1; j <=9 ; ++j){
System.out.println( i + "x" + j + "=" + (i * j) );
}
}
}
}
|
a.cc:1:1: error: expected unqualified-id before 'public'
1 | public class QQ
| ^~~~~~
|
s985844292
|
p00000
|
C++
|
#include <iostream>
using namespace std;
int main(){
for(int i=1;i<10;i++){
for(int j=0;j<10;j++){
cout<<i<<'x'<<j<<'='<<i*j<<endl;
}
|
a.cc: In function 'int main()':
a.cc:13:2: error: expected '}' at end of input
13 | }
| ^
a.cc:6:22: note: to match this '{'
6 | for(int i=1;i<10;i++){
| ^
a.cc:13:2: error: expected '}' at end of input
13 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s503463116
|
p00000
|
C++
|
class q0{
public static void main(String[] args){
int i, j;
for(i=1; i<9; i++){
for(j=1; j<10; j++){
System.out.print(i);
System.out.print("x");
System.out.print(j);
System.out.print("=");
System.out.println(i*j);
}
}
}
}
|
a.cc:2:11: error: expected ':' before 'static'
2 | public static void main(String[] args){
| ^~~~~~~
| :
a.cc:2:29: error: 'String' has not been declared
2 | public static void main(String[] args){
| ^~~~~~
a.cc:2:38: error: expected ',' or '...' before 'args'
2 | public static void main(String[] args){
| ^~~~
a.cc:14:2: error: expected ';' after class definition
14 | }
| ^
| ;
a.cc: In static member function 'static void q0::main(int*)':
a.cc:6:9: error: 'System' was not declared in this scope
6 | System.out.print(i);
| ^~~~~~
|
s999816141
|
p00000
|
C++
|
class Main {
public static void main(String[] a) {
for(int i=1; i<=9; i++) {
for(int j=1; j<=9; j++) {
System.out.println(i+"x"+j+"="+i*j);
}
}
}
}
|
a.cc:2:11: error: expected ':' before 'static'
2 | public static void main(String[] a) {
| ^~~~~~~
| :
a.cc:2:29: error: 'String' has not been declared
2 | public static void main(String[] a) {
| ^~~~~~
a.cc:2:38: error: expected ',' or '...' before 'a'
2 | public static void main(String[] a) {
| ^
a.cc:9:2: error: expected ';' after class definition
9 | }
| ^
| ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:17: error: 'System' was not declared in this scope
5 | System.out.println(i+"x"+j+"="+i*j);
| ^~~~~~
a.cc:5:43: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
5 | System.out.println(i+"x"+j+"="+i*j);
| ~~~~~~~^~~~
| | |
| | const char [2]
| const char*
|
s981291285
|
p00000
|
C++
|
public class Main {
public static void main(String[] args) {
for(int i=1; i<=9; i++) {
for(int j=1; j<=9; j++) {
System.out.println(i+"x"+j+"="+i*j);
}
}
}
}
|
a.cc:1:1: error: expected unqualified-id before 'public'
1 | public class Main {
| ^~~~~~
|
s837509060
|
p00000
|
C++
|
using System;
namespace acm1000
{
class Program
{
static void Main(string[] args)
{
int i, j;
for (i = 1; i <= 9; i++)
{
for (j = 1; j <= 9; j++)
{
Console.Write("{0}*{1}={2} \r\n",i,j,i*j);
}
}
Console.ReadLine();
}
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:7:26: error: 'string' has not been declared
7 | static void Main(string[] args)
| ^~~~~~
a.cc:7:35: error: expected ',' or '...' before 'args'
7 | static void Main(string[] args)
| ^~~~
a.cc:20:6: error: expected ';' after class definition
20 | }
| ^
| ;
a.cc: In static member function 'static void acm1000::Program::Main(int*)':
a.cc:14:21: error: 'Console' was not declared in this scope
14 | Console.Write("{0}*{1}={2} \r\n",i,j,i*j);
| ^~~~~~~
a.cc:17:13: error: 'Console' was not declared in this scope
17 | Console.ReadLine();
| ^~~~~~~
|
s113512621
|
p00000
|
C++
|
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int i, j;
int ans;
for(i = 1; i < 10; i++)
{
for(j = 1; j < 10; j++)
{
ans = i * j
cout << i << "x" << j << "=" << ans << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:36: error: expected ';' before 'cout'
14 | ans = i * j
| ^
| ;
15 | cout << i << "x" << j << "=" << ans << endl;
| ~~~~
a.cc:20:2: error: expected '}' at end of input
20 | }
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s380813410
|
p00000
|
C++
|
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int i, j;
int ans;
for(i = 1; i < 10; i++)
{
for(j = 1; j < 10; j++)
{
ans = i * j
cout << i << "x" << j << "=" << ans << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:36: error: expected ';' before 'cout'
14 | ans = i * j
| ^
| ;
15 | cout << i << "x" << j << "=" << ans << endl;
| ~~~~
|
s366420165
|
p00000
|
C++
|
http://www.cprogramdevelop.com/1099631/
http://www.cprogramdevelop.com/1099631/
http://www.cprogramdevelop.com/1099631/
http://www.cprogramdevelop.com/1099631/
http://www.cprogramdevelop.com/1099631/
|
a.cc:1:5: error: found ':' in nested-name-specifier, expected '::'
1 | http://www.cprogramdevelop.com/1099631/
| ^
| ::
a.cc:1:1: error: 'http' does not name a type
1 | http://www.cprogramdevelop.com/1099631/
| ^~~~
|
s898559387
|
p00000
|
C++
|
include <iostream>
using namespace std;
int main()
{
for(int x = 1; x <= 9; ++x){
for(int y = 1; y <= 9; ++y){
cout << x << "x" << y << "=" << x*y << endl;
}
}
return 0;
}
|
a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:7: error: 'cout' was not declared in this scope
9 | cout << x << "x" << y << "=" << x*y << endl;
| ^~~~
a.cc:9:46: error: 'endl' was not declared in this scope
9 | cout << x << "x" << y << "=" << x*y << endl;
| ^~~~
|
s893530651
|
p00000
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a = 1, b = 1;
for(int i = 1; i < 10; i++){
for(int j = 1; j < 10; j++){
cout << a << "x" << b << endl;
b++;
}
b = 1;
a++;
}
return 0;
}v
|
a.cc:15:2: error: 'v' does not name a type
15 | }v
| ^
|
s285449335
|
p00000
|
C++
|
#include<stdio.h>
int main()
{
int a,i,j;
for(i=1;i<=9;i++)
{
for(j=1;j<=9;j++)
{
printf("%d x %d = %d",i,j,i*j);
printf("\n");
}
}
|
a.cc: In function 'int main()':
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:3:1: note: to match this '{'
3 | {
| ^
|
s374845079
|
p00000
|
C++
|
class Main{
public static void main(String[] a){
for (i=1,i<10,i++){
for (j=1,j<10,j++){
System.out.println(i + "×" + j + "=" i*j)
}
}
}
}
|
a.cc:2:11: error: expected ':' before 'static'
2 | public static void main(String[] a){
| ^~~~~~~
| :
a.cc:2:29: error: 'String' has not been declared
2 | public static void main(String[] a){
| ^~~~~~
a.cc:2:38: error: expected ',' or '...' before 'a'
2 | public static void main(String[] a){
| ^
a.cc:9:2: error: expected ';' after class definition
9 | }
| ^
| ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:3:12: error: 'i' was not declared in this scope
3 | for (i=1,i<10,i++){
| ^
a.cc:8:5: error: expected primary-expression before '}' token
8 | }
| ^
a.cc:8:5: error: expected ';' before '}' token
a.cc:8:5: error: expected primary-expression before '}' token
a.cc:8:5: error: expected ')' before '}' token
a.cc:3:11: note: to match this '('
3 | for (i=1,i<10,i++){
| ^
a.cc:8:5: error: expected primary-expression before '}' token
8 | }
| ^
|
s280852715
|
p00000
|
C++
|
class Main{
public static void main(String[] a){
for (int i=1;i<10;i++){
for (int j=1;j<10;j++){
System.out.println(i + "×" + j + "=" i*j);
}
}
}
}
|
a.cc:2:11: error: expected ':' before 'static'
2 | public static void main(String[] a){
| ^~~~~~~
| :
a.cc:2:29: error: 'String' has not been declared
2 | public static void main(String[] a){
| ^~~~~~
a.cc:2:38: error: expected ',' or '...' before 'a'
2 | public static void main(String[] a){
| ^
a.cc:9:2: error: expected ';' after class definition
9 | }
| ^
| ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:8: error: 'System' was not declared in this scope
5 | System.out.println(i + "×" + j + "=" i*j);
| ^~~~~~
a.cc:5:39: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
5 | System.out.println(i + "×" + j + "=" i*j);
| ~~~~~~~~~~~ ^ ~~~
| | |
| | const char [2]
| const char*
|
s397354864
|
p00000
|
C++
|
#include<iostream>
using mamespace std;
int main(){
for(int i=1;i<=9;i++){
for(int j=1;j<=9;j++){
cout<<i<<"*"<<j<<"="<<i*j<<endl;
}
}
return 0;
}
|
a.cc:3:7: error: expected nested-name-specifier before 'mamespace'
3 | using mamespace std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | cout<<i<<"*"<<j<<"="<<i*j<<endl;
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:8:52: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
8 | cout<<i<<"*"<<j<<"="<<i*j<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s321474497
|
p00000
|
C++
|
#include <cstdio.h>
#include <algorithm>
using namespace std;
int main(void)
{
int i, j;
for (i = 1; i < 10; i++){
for (j = 1; j < 10; j++){
printf("%dx%d=%d"i, j, i * j);
}
}
return (0);
}
|
a.cc:1:10: fatal error: cstdio.h: No such file or directory
1 | #include <cstdio.h>
| ^~~~~~~~~~
compilation terminated.
|
s036991012
|
p00000
|
C++
|
#include<iostream>
using namespece std;
int main()
{
int i,j;
for(i=1;i<=9;i++)
{
for(j=1;j<=9;j++)
cout << i << "x" << j << = << i*j << endl;
}
return 0;
}
|
a.cc:2:7: error: expected nested-name-specifier before 'namespece'
2 | using namespece std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout << i << "x" << j << = << i*j << endl;
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:38: error: expected primary-expression before '=' token
9 | cout << i << "x" << j << = << i*j << endl;
| ^
a.cc:9:40: error: expected primary-expression before '<<' token
9 | cout << i << "x" << j << = << i*j << endl;
| ^~
a.cc:9:50: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | cout << i << "x" << j << = << i*j << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s890952667
|
p00000
|
C++
|
#include<iostream>
using namespace std;
int main()
{
int i,j;
for(i=1;i<=9;i++)
{
for(j=1;j<=9;j++)
cout << i << "x" << j << = << i*j << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:38: error: expected primary-expression before '=' token
9 | cout << i << "x" << j << = << i*j << endl;
| ^
a.cc:9:40: error: expected primary-expression before '<<' token
9 | cout << i << "x" << j << = << i*j << endl;
| ^~
|
s829457272
|
p00000
|
C++
|
class Main{
public static void main(String[] a){
for(int i = 1; i <= 9;i++) {
for(int j = 1; j <= 9; j++) {
System.out.println(i + "x" + j + "=" + i*j);
}
}
}
}
|
a.cc:2:11: error: expected ':' before 'static'
2 | public static void main(String[] a){
| ^~~~~~~
| :
a.cc:2:29: error: 'String' has not been declared
2 | public static void main(String[] a){
| ^~~~~~
a.cc:2:38: error: expected ',' or '...' before 'a'
2 | public static void main(String[] a){
| ^
a.cc:9:2: error: expected ';' after class definition
9 | }
| ^
| ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:25: error: 'System' was not declared in this scope
5 | System.out.println(i + "x" + j + "=" + i*j);
| ^~~~~~
a.cc:5:56: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
5 | System.out.println(i + "x" + j + "=" + i*j);
| ~~~~~~~~~~~ ^ ~~~
| | |
| | const char [2]
| const char*
|
s017381313
|
p00001
|
Java
|
import java.io.*;
public class Main {
public static void main(String args[]) throws IOException{
int[] height = new int[10];
int i,j;
int temp;
for(i = 0; i < 10; i++){
BufferedReader input =
new BufferedReader(new InputStreamReader(System.in));
height[i] = Integer.parseInt(input.readLine());
}
for(i = 0; i < height.length - 1; i++){
for(j = height.length - 1; j > i; j--){
if(height[j] < height[j-1]){
temp = height[j];
height[j] = height[j-1];
height[j-1] = temp;
}
}
}
for(i = height.length - 1; i > height.length - 4; i--){
System.out.println(height[i]);
}
}
}
import java.io.*;
public class Main {
public static void main(String args[]) throws IOException{
int[] height = new int[10];
int i,j;
int temp;
for(i = 0; i < 10; i++){
BufferedReader input =
new BufferedReader(new InputStreamReader(System.in));
height[i] = Integer.parseInt(input.readLine());
}
for(i = 0; i < height.length - 1; i++){
for(j = height.length - 1; j > i; j--){
if(height[j] < height[j-1]){
temp = height[j];
height[j] = height[j-1];
height[j-1] = temp;
}
}
}
for(i = height.length - 1; i > height.length - 4; i--){
System.out.println(height[i]);
}
}
}
|
Main.java:28: error: class, interface, enum, or record expected
import java.io.*;
^
1 error
|
s233762745
|
p00001
|
Java
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Integer;
import java.lang.String;
import java.lang.System;
class Main {
public static void main(String[] a) throws Exception {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
int [] mountains = new int[10];
int i = 0;
while (true) {
String s = r.readLine();
mountains[i++] = Integer.valueOf(s);
if(i >= 10) break;
}
Arrays.sort(mountains);
for(i = 9; i < 6; i--) {
System.out.println(mountains[i]);
}
}
}
|
Main.java:18: error: cannot find symbol
Arrays.sort(mountains);
^
symbol: variable Arrays
location: class Main
1 error
|
s436441387
|
p00001
|
Java
|
class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
Integer[] input = new Integer[10];
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
for(int i=0; i<10; i++){
input[i] = Integer.parseInt(br.readLine());
}
Arrays.sort(input, Collections.reverseOrder());
for(int i=0; i<3; i++){
System.out.println(input[i]);
}
}
}
|
Main.java:2: error: cannot find symbol
public static void main(String[] args) throws NumberFormatException, IOException {
^
symbol: class IOException
location: class Main
Main.java:5: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:5: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:5: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class InputStreamReader
location: class Main
Main.java:10: error: cannot find symbol
Arrays.sort(input, Collections.reverseOrder());
^
symbol: variable Arrays
location: class Main
Main.java:10: error: cannot find symbol
Arrays.sort(input, Collections.reverseOrder());
^
symbol: variable Collections
location: class Main
6 errors
|
s067405066
|
p00001
|
Java
|
public static void insertSort(int[] arr)
{
/*if(arr.length==1)
{
return arr;
}*/
for(int n=1;n<arr.length;n++)
{
for(int i=n;i>0;i--)
{
if(arr[i-1]>arr[i])
{
int temp=arr[i];
arr[i]=arr[i-1];
arr[i-1]=temp;
}
}
}
for(int j=arr.length-1;j>arr.length-4;j--);
{
System.out.println(arr[j]);
}
}
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void insertSort(int[] arr)
^
(use --enable-preview to enable unnamed classes)
1 error
|
s984290139
|
p00001
|
Java
|
import java.io.*;
import java.util.Arrays;
public class ProgteamA {
public static void main(String args[])throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter length");
int len = Integer.parseInt(br.readLine());
int A[] = new int[len];
for(int i =0; i< len; i++)
A[i] = Integer.parseInt(br.readLine());
Arrays.sort(A);
System.out.println(A[len-1]);
System.out.println(A[len-2]);
System.out.println(A[len-3]);
}
}
|
Main.java:3: error: class ProgteamA is public, should be declared in a file named ProgteamA.java
public class ProgteamA {
^
1 error
|
s516682655
|
p00001
|
Java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import java.util.Scanner;
/**
*
* @author sahil
*/
public class main {
private static Scanner input;
public static void main(String[] args) {
input = new Scanner(System.in);
int arr[]=new int[10];
for(int i=0;i<10;i++)
{
arr[i]=input.nextInt();
}
for(int j=0;j<3;j++)
{
for(int k=0;k<10-j-1;k++)
{
if(arr[k]>arr[k+1])
{
int temp=arr[k];
arr[k]=arr[k+1];
arr[k+1]=temp;
}
}
}
for(int i=7;i<10;i++)
{
System.out.println(arr[i]);
}
}
}
|
Main.java:15: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s403467806
|
p00001
|
Java
|
import java.util.Scanner;
import java.util.ArrayList;
public class Main {
public static void main (String[] args) {
Scanner input = new Scanner(System.in);
ArrayList<Integer> t = new ArrayList<Integer>();
for (int i=0; i<10; i++) t.add(input.nextInt());
Collections.sort(t);
for (int i=0; i<3; i++) System.out.println(t.get(i));
}
}
|
Main.java:9: error: cannot find symbol
Collections.sort(t);
^
symbol: variable Collections
location: class Main
1 error
|
s773851382
|
p00001
|
Java
|
public class Main{
public static void main(String[] args) throws IOException {
FileReader in = new FileReader("test.txt");
BufferedReader br = new BufferedReader(in);
ArrayList<Integer> Al = new ArrayList<Integer>();
// Read in
String line = br.readLine();
while (line != null) { // You might also want to check for empty?
Al.add(Integer.valueOf(line));
line = br.readLine();
}
// Quick Sort
Collections.sort(Al);
// Print first 3
Integer i = Al.size() - 1;
Integer numOfElements = 3;
while (i >= Al.size()-numOfElements){
System.out.println(Al.get(i));
i--;
}
}
}
|
Main.java:2: error: cannot find symbol
public static void main(String[] args) throws IOException {
^
symbol: class IOException
location: class Main
Main.java:3: error: cannot find symbol
FileReader in = new FileReader("test.txt");
^
symbol: class FileReader
location: class Main
Main.java:3: error: cannot find symbol
FileReader in = new FileReader("test.txt");
^
symbol: class FileReader
location: class Main
Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader(in);
^
symbol: class BufferedReader
location: class Main
Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader(in);
^
symbol: class BufferedReader
location: class Main
Main.java:5: error: cannot find symbol
ArrayList<Integer> Al = new ArrayList<Integer>();
^
symbol: class ArrayList
location: class Main
Main.java:5: error: cannot find symbol
ArrayList<Integer> Al = new ArrayList<Integer>();
^
symbol: class ArrayList
location: class Main
Main.java:15: error: cannot find symbol
Collections.sort(Al);
^
symbol: variable Collections
location: class Main
8 errors
|
s510103337
|
p00001
|
Java
|
import java.util.Arrays;
import java.util.Scanner;
public class Sort {
public static void main(String args[]){
Scanner in = new Scanner(System.in);
int[] mylist = new int[10];
for(int i = 0; i<10; i++){
int a = in.nextInt();
mylist[i] = a;
}
Arrays.sort(mylist);
System.out.println(mylist[9]);
System.out.println(mylist[8]);
System.out.println(mylist[7]);
}
}
|
Main.java:3: error: class Sort is public, should be declared in a file named Sort.java
public class Sort {
^
1 error
|
s977850584
|
p00001
|
Java
|
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main{
public static void main(String[] args){
ArrayList<Integer> Al = new ArrayList<Integer>();
// Read in
for (Integer i = 0; i < 10; i++){
Scanner user_input = new Scanner( System.in );
Al.add(Integer.valueOf(user_input.toString()));
}
// Quick Sort
Collections.sort(Al);
// Print first 3
Integer i = Al.size() - 1;
Integer numOfElements = 3;
while (i >= Al.size()-numOfElements){
System.out(Al.get(i));
i--;
}
}
}
|
Main.java:24: error: cannot find symbol
System.out(Al.get(i));
^
symbol: method out(Integer)
location: class System
1 error
|
s110315868
|
p00001
|
Java
|
import java.util.Scanner;
public class TopHills {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
//BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int[] tops = {0,0,0};
for (int i = 0;i < 10;i++) {
int h = scan.nextInt();
// do nothing if equality
if (h > tops[0]) {
tops[2]=tops[1];
tops[1]=tops[0];
tops[0] = h;
} else if (h < tops[0] && h > tops[1]) {
tops[2]=tops[1];
tops[1] = h;
} else if (h < tops[1] && h > tops[2]) {
tops[2]=h;
}
}
System.out.print(tops[0]);
System.out.print("\n");
System.out.print(tops[1]);
System.out.print("\n");
System.out.print(tops[2]);
System.out.print("\n");
}
}
|
Main.java:2: error: class TopHills is public, should be declared in a file named TopHills.java
public class TopHills {
^
1 error
|
s856000337
|
p00001
|
Java
|
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
public class topThree {
public static void main(String[] args){
int[] input = new int[10];
Scanner s = new Scanner(System.in);
for(int i=0; i<10; i++){
System.out.println("Please input the "+ (i+1) +"th number(integer)");
input[i]=s.nextInt();
}
Arrays.sort(input);
int i=input.length-1;
while(i>input.length-4){
System.out.println(input[i]);
i--;
}
}
}
|
Main.java:5: error: class topThree is public, should be declared in a file named topThree.java
public class topThree {
^
1 error
|
s770978337
|
p00001
|
Java
|
public class main{
public static void main(String args[]){
int largest=0;
int largest2=0;
int largest3=0;
for(int i=0;i<args.length;i++){
if(Integer.parseInt(args[i])>largest){
largest3=largest2;
largest2=largest;
largest=Integer.parseInt(args[i]);
}
i++;
}
System.out.println(largest);
System.out.println(largest2);
System.out.println(largest3);
}
}
|
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
^
1 error
|
s203041803
|
p00001
|
Java
|
public class Main{
public static void main(String[] args) throws Exception {
// buffer from input
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
// read by line until the end of file
String line;
String thisToken;
ArrayList<Integer> heightMountain = new ArrayList<Integer>();
int thisVal;
for(int i = 0; i<10 ; i++){
// Stringify the line
line = in.readLine();
StringTokenizer st = new StringTokenizer(line);
thisToken = st.nextToken();
thisVal = Integer.parseInt(thisToken);
heightMountain.add(thisVal);
Collections.sort(heightMountain);
// Output
}
for(int i = 9; i>6; i--){
System.out.println(heightMountain.get(i));
}
}
}
|
Main.java:5: error: cannot find symbol
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:5: error: cannot find symbol
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:5: error: cannot find symbol
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class InputStreamReader
location: class Main
Main.java:9: error: cannot find symbol
ArrayList<Integer> heightMountain = new ArrayList<Integer>();
^
symbol: class ArrayList
location: class Main
Main.java:9: error: cannot find symbol
ArrayList<Integer> heightMountain = new ArrayList<Integer>();
^
symbol: class ArrayList
location: class Main
Main.java:15: error: cannot find symbol
StringTokenizer st = new StringTokenizer(line);
^
symbol: class StringTokenizer
location: class Main
Main.java:15: error: cannot find symbol
StringTokenizer st = new StringTokenizer(line);
^
symbol: class StringTokenizer
location: class Main
Main.java:20: error: cannot find symbol
Collections.sort(heightMountain);
^
symbol: variable Collections
location: class Main
8 errors
|
s533932887
|
p00001
|
Java
|
public class Question2 {
public static void main(String[] args) {
int[] array = { 1819, 2003, 876, 2840, 1723, 1673, 3776, 2848, 1592, 922 };
for (int i = 0; i < array.length; i += 1) {
for (int j = i + 1; j < array.length; j += 1) {
if (array[i] < array[j]) {
int temporary = array[i];
array[i] = array[j];
array[j] = temporary;
}
}
}
for (int x = 0; x < 3; x += 1) {
System.out.println(array[x]);
}
}
}
|
Main.java:1: error: class Question2 is public, should be declared in a file named Question2.java
public class Question2 {
^
1 error
|
s264780869
|
p00001
|
Java
|
public class Question2 {
public static void main(String[] args) {
int[] array = { 1819, 2003, 876, 2840, 1723, 1673, 3776, 2848, 1592,
922 };
for (int i = 0; i < array.length; i += 1) {
for (int j = i + 1; j < array.length; j += 1) {
if (array[i] < array[j]) {
int temporary = array[i];
array[i] = array[j];
array[j] = temporary;
}
}
}
for (int x = 0; x < 3; x += 1) {
System.out.println(array[x]);
}
}
}
|
Main.java:1: error: class Question2 is public, should be declared in a file named Question2.java
public class Question2 {
^
1 error
|
s388034189
|
p00001
|
Java
|
public class {
public static void main(String[] args) {
int[] array = { 1819, 2003, 876, 2840, 1723, 1673, 3776, 2848, 1592,
922 };
for (int i = 0; i < array.length; i += 1) {
for (int j = i + 1; j < array.length; j += 1) {
if (array[i] < array[j]) {
int temporary = array[i];
array[i] = array[j];
array[j] = temporary;
}
}
}
for (int x = 0; x < 3; x += 1) {
System.out.println(array[x]);
}
}
}
|
Main.java:1: error: <identifier> expected
public class {
^
1 error
|
s432781126
|
p00001
|
Java
|
int[] array = { 256, 3456, 4377, 6472, 4356, 467, 3456, 346, 2345, 589 };
for (int i = 0; i < array.length; i += 1) {
for (int j = i + 1; j < array.length; j += 1) {
if (array[i] < array[j]) {
int temporary = array[i];
array[i] = array[j];
array[j] = temporary;
}
}
}
for (int x = 0; x < 3; x += 1) {
System.out.println(array[x]);
}
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
int[] array = { 256, 3456, 4377, 6472, 4356, 467, 3456, 346, 2345, 589 };
^
(use --enable-preview to enable unnamed classes)
Main.java:2: error: class, interface, enum, or record expected
for (int i = 0; i < array.length; i += 1) {
^
Main.java:2: error: class, interface, enum, or record expected
for (int i = 0; i < array.length; i += 1) {
^
Main.java:2: error: class, interface, enum, or record expected
for (int i = 0; i < array.length; i += 1) {
^
Main.java:3: error: class, interface, enum, or record expected
for (int j = i + 1; j < array.length; j += 1) {
^
Main.java:3: error: class, interface, enum, or record expected
for (int j = i + 1; j < array.length; j += 1) {
^
Main.java:6: error: class, interface, enum, or record expected
array[i] = array[j];
^
Main.java:7: error: class, interface, enum, or record expected
array[j] = temporary;
^
Main.java:8: error: class, interface, enum, or record expected
}
^
Main.java:11: error: class, interface, enum, or record expected
for (int x = 0; x < 3; x += 1) {
^
Main.java:11: error: class, interface, enum, or record expected
for (int x = 0; x < 3; x += 1) {
^
Main.java:13: error: class, interface, enum, or record expected
}
^
12 errors
|
s890598171
|
p00001
|
Java
|
int[] array = { 256, 3456, 4377, 6472, 4356, 467, 3456, 346, 2345, 589 };
for (int i = 0; i < array.length; i += 1) {
for (int j = i + 1; j < array.length; j += 1) {
if (array[i] < array[j]) {
int temporary = array[i];
array[i] = array[j];
array[j] = temporary;
}
}
}
for (int x = 0; x < 3; x += 1) {
System.out.println(array[x]);
}
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
int[] array = { 256, 3456, 4377, 6472, 4356, 467, 3456, 346, 2345, 589 };
^
(use --enable-preview to enable unnamed classes)
Main.java:2: error: class, interface, enum, or record expected
for (int i = 0; i < array.length; i += 1) {
^
Main.java:2: error: class, interface, enum, or record expected
for (int i = 0; i < array.length; i += 1) {
^
Main.java:2: error: class, interface, enum, or record expected
for (int i = 0; i < array.length; i += 1) {
^
Main.java:3: error: class, interface, enum, or record expected
for (int j = i + 1; j < array.length; j += 1) {
^
Main.java:3: error: class, interface, enum, or record expected
for (int j = i + 1; j < array.length; j += 1) {
^
Main.java:6: error: class, interface, enum, or record expected
array[i] = array[j];
^
Main.java:7: error: class, interface, enum, or record expected
array[j] = temporary;
^
Main.java:8: error: class, interface, enum, or record expected
}
^
Main.java:11: error: class, interface, enum, or record expected
for (int x = 0; x < 3; x += 1) {
^
Main.java:11: error: class, interface, enum, or record expected
for (int x = 0; x < 3; x += 1) {
^
Main.java:13: error: class, interface, enum, or record expected
}
^
12 errors
|
s731982110
|
p00001
|
Java
|
public class Main {
public static void main(String[] args) {
int[] input = new int[10];
Scanner sc = new Scanner(System.in);
for(int i = 0; i < input.length; i++) {
System.out.println((i + 1) + "番目の読み込み");
input[i] = sc.nextInt();
System.out.println("値:" + input[i]);
}
for(int i = 0; i < input.length - 1; i++) {
for(int j = i + 1; j <= input.length - 1;) {
if(input[i] < input[j]) {
int tmp = input[i];
input[i] = input[j];
input[j] = tmp;
}
}
}
for(int i = 0; i < 3; i++) {
System.out.println(input[i]);
}
}
}
|
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s052273970
|
p00001
|
Java
|
import java.util.Scanner;
public class Volume1 {
public static void main(String[] args) {
int[] takasa;
takasa = new int[10];
Scanner n=new Scanner(System.in);
for (int i = 0; i < 10;i++){
takasa[i]=n.nextInt();
}
int max=0;
int max2=0;
int max3=0;
for (int a = 0; a < 10; a++){
if (max < takasa[a]){ max=takasa[a];
}
}//ループ終了
for (int b = 0; b < 10; b++){
if (max2 < takasa[b] && takasa[b] < max){ max2=takasa[b];
}
}//ループ終了
for (int c = 0; c < 10; c++){
if (max3 < takasa[c] && takasa[c] < max2){ max3=takasa[c];
}
}//ループ終了
System.out.println(max);
System.out.println(max2);
System.out.println(max3);
}
|
Main.java:28: error: reached end of file while parsing
}
^
1 error
|
s723632887
|
p00001
|
Java
|
import java.util.Scanner;
public class Volume1 {
public static void main(String[] args) {
int[] takasa;
takasa = new int[10];
Scanner n=new Scanner(System.in);
for (int i = 0; i < 10;i++){
takasa[i]=n.nextInt();
}
int max=0;
int max2=0;
int max3=0;
for (int a = 0; a < 10; a++){
if (max < takasa[a]){ max=takasa[a];
}
}//ループ終了
for (int b = 0; b < 10; b++){
if (max2 < takasa[b] && takasa[b] < max){ max2=takasa[b];
}
}//ループ終了
for (int c = 0; c < 10; c++){
if (max3 < takasa[c] && takasa[c] < max2){ max3=takasa[c];
}
}//ループ終了
System.out.println(max);
System.out.println(max2);
System.out.println(max3);
}
}
|
Main.java:2: error: class Volume1 is public, should be declared in a file named Volume1.java
public class Volume1 {
^
1 error
|
s850526878
|
p00001
|
Java
|
import java.io.*;
class hills{
public static void main(String args[]){
String buf = "";
int save;
int n = 10;
int data[];
data = new int[10];
BufferedReader lineread = new BufferedReader(
new InputStreamReader(System.in));
for(int i=0;i<10;i++){
int a =i+1;
System.out.println("第"+a+"の山の高さを入力しなさい");
try{
buf = lineread.readLine();
}catch(IOException e){}
data[i] = new Integer(buf).intValue();
}
for(int i=n-2;i>=0;i--){
for(int j=0; j<=i; j++)
if(data[j]>data[j+1]){
save = data[j]; data[j] = data[j+1];data[j+1] = save;
}
}
System.out.println(data[9]);
System.out.println(data[8]);
System.out.println(data[7]);
}
returun 0;
}
|
Main.java:29: error: <identifier> expected
returun 0;
^
1 error
|
s919980153
|
p00001
|
Java
|
class Main{
public static void main(String[] a){
Scanner scan = new Scanner(System.in);
int[] data = new int[3];
int tmp;
for(int i=0;i<10;i++){
tmp=scan.nextInt();
for(j=0;j<3;j++){
if(data[j]<=tmp){
for(int k=2;k>j;k--){
data[k]=data[k-1];
}
data[j]=tmp;
}
}
}
for(int i=0;i<3;i++){
System.out.println(data[i]);
}
}
}
|
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:8: error: cannot find symbol
for(j=0;j<3;j++){
^
symbol: variable j
location: class Main
Main.java:8: error: cannot find symbol
for(j=0;j<3;j++){
^
symbol: variable j
location: class Main
Main.java:8: error: cannot find symbol
for(j=0;j<3;j++){
^
symbol: variable j
location: class Main
Main.java:9: error: cannot find symbol
if(data[j]<=tmp){
^
symbol: variable j
location: class Main
Main.java:10: error: cannot find symbol
for(int k=2;k>j;k--){
^
symbol: variable j
location: class Main
Main.java:13: error: cannot find symbol
data[j]=tmp;
^
symbol: variable j
location: class Main
8 errors
|
s035057901
|
p00001
|
Java
|
import java.util.Scanner;
class Main{
public static void main(String[] a){
Scanner scan = new Scanner(System.in);
int[] data = new int[3]={0};
int tmp;
for(int i=0;i<10;i++){
tmp=scan.nextInt();
for(int j=0;j<3;j++){
if(data[j]<=tmp){
for(int k=2;k>j;k--){
data[k]=data[k-1];
}
data[j]=tmp;
}
}
}
for(int i=0;i<3;i++){
System.out.println(data[i]);
}
}
}
|
Main.java:6: error: illegal start of expression
int[] data = new int[3]={0};
^
Main.java:6: error: not a statement
int[] data = new int[3]={0};
^
Main.java:6: error: ';' expected
int[] data = new int[3]={0};
^
3 errors
|
s474746860
|
p00001
|
Java
|
import java.util.Scanner;
class Main{
public static void main(String[] a){
Scanner scan = new Scanner(System.in);
int[] data = new int[3]{0};
int tmp;
for(int i=0;i<10;i++){
tmp=scan.nextInt();
for(int j=0;j<3;j++){
if(data[j]<=tmp){
for(int k=2;k>j;k--){
data[k]=data[k-1];
}
data[j]=tmp;
}
}
}
for(int i=0;i<3;i++){
System.out.println(data[i]);
}
}
}
|
Main.java:6: error: array creation with both dimension expression and initialization is illegal
int[] data = new int[3]{0};
^
1 error
|
s277685677
|
p00001
|
Java
|
import java.util.Scanner;
class Main{
public static void main(String[] a){
Scanner scan = new Scanner(System.in);
int[] data;
data = new int[3]{0,0,0};
int tmp;
for(int i=0;i<10;i++){
tmp=scan.nextInt();
for(int j=0;j<3;j++){
if(data[j]<=tmp){
for(int k=2;k>j;k--){
data[k]=data[k-1];
}
data[j]=tmp;
}
}
}
for(int i=0;i<3;i++){
System.out.println(data[i]);
}
}
}
|
Main.java:7: error: array creation with both dimension expression and initialization is illegal
data = new int[3]{0,0,0};
^
1 error
|
s885918528
|
p00001
|
Java
|
import java.util.Scanner;
class Main{
public static void main(String[] a){
Scanner scan = new Scanner(System.in);
int[] data;
data = new int[3]{0,0,0};
int tmp;
for(int i=0;i<10;i++){
tmp=scan.nextInt();
for(int j=0;j<3;j++){
if(data[j]<=tmp){
for(int k=2;k>j;k--){
data[k]=data[k-1];
}
data[j]=tmp;
}
}
}
for(int i=0;i<3;i++){
System.out.println(data[i]);
}
}
}
|
Main.java:7: error: array creation with both dimension expression and initialization is illegal
data = new int[3]{0,0,0};
^
1 error
|
s912402836
|
p00001
|
Java
|
import java.util.Scanner;
class Main{
public static void main(String[] a){
Scanner scan = new Scanner(System.in);
int[] data;
data = new int[3]{0,0,0};
int tmp;
for(int i=0;i<10;i++){
tmp=scan.nextInt();
for(int j=0;j<3;j++){
if(data[j]<=tmp){
for(int k=2;k>j;k--){
data[k]=data[k-1];
}
data[j]=tmp;
}
}
}
for(int i=0;i<3;i++){
System.out.println(data[i]);
}
}
}
|
Main.java:7: error: array creation with both dimension expression and initialization is illegal
data = new int[3]{0,0,0};
^
1 error
|
s265894362
|
p00001
|
Java
|
import java.util.*;
class Q2
{
public static void main(String[] av)
{
Scanner sc = new Scanner( System.in );
ArrayList<Integer> al = new ArrayList<Integer>();
while( sc.hasNextInt() )
{
al.add( sc.nextInt() )
}
Collections.sort( al ); Collections.reverse( al );
for ( int i = 0; i < 3; ++i )
{
System.out.println( al.get(i) );
}
}
|
Main.java:10: error: ';' expected
al.add( sc.nextInt() )
^
Main.java:17: error: reached end of file while parsing
}
^
2 errors
|
s882073322
|
p00001
|
Java
|
class q2
{
public static void main(string[] av)
{
java.util.scanner sc = new java.util.scanner(system.in);
java.util.arraylist<integer> vec = new java.util.arraylist<>();
while( sc.hasnextint() )
{
vec.add( sc.nextint() );
}
java.util.collections.sort( vec );
java.util.collections.reverse( vec );
for ( int i = 0; i < 3; ++i )
{
system.out.println( vec.get(i) );
}
}
}
|
Main.java:4: error: cannot find symbol
public static void main(string[] av)
^
symbol: class string
location: class q2
Main.java:6: error: cannot find symbol
java.util.scanner sc = new java.util.scanner(system.in);
^
symbol: class scanner
location: package java.util
Main.java:6: error: cannot find symbol
java.util.scanner sc = new java.util.scanner(system.in);
^
symbol: class scanner
location: package java.util
Main.java:6: error: cannot find symbol
java.util.scanner sc = new java.util.scanner(system.in);
^
symbol: variable system
location: class q2
Main.java:7: error: cannot find symbol
java.util.arraylist<integer> vec = new java.util.arraylist<>();
^
symbol: class arraylist
location: package java.util
Main.java:7: error: cannot find symbol
java.util.arraylist<integer> vec = new java.util.arraylist<>();
^
symbol: class integer
location: class q2
Main.java:7: error: cannot find symbol
java.util.arraylist<integer> vec = new java.util.arraylist<>();
^
symbol: class arraylist
location: package java.util
Main.java:12: error: cannot find symbol
java.util.collections.sort( vec );
^
symbol: class collections
location: package java.util
Main.java:13: error: cannot find symbol
java.util.collections.reverse( vec );
^
symbol: class collections
location: package java.util
Main.java:16: error: package system does not exist
system.out.println( vec.get(i) );
^
10 errors
|
s654682041
|
p00001
|
Java
|
import java.io.*;
import java.util.Arrays;
public class {
public static void main(String[] args) throws IOException
{
BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
int[] num = new int[10];
for(int i=0; i<10; i++){
num[i] = Integer.parseInt(br.readLine());
}
Arrays.sort(num);
for(int i=num.length-1; i>num.length-4; i--){
System.out.println(num[i]);
}
|
Main.java:6: error: <identifier> expected
public class {
^
Main.java:17: error: reached end of file while parsing
}
^
2 errors
|
s914303057
|
p00001
|
Java
|
import java.io.*;
import java.util.Arrays;
public class Main{
public static void main(String[] args) throws IOException
{
BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
int[] num = new int[10];
for(int i=0; i<10; i++){
num[i] = Integer.parseInt(br.readLine());
}
Arrays.sort(num);
for(int i=num.length-1; i>num.length-4; i--){
System.out.println(num[i]);
}
|
Main.java:17: error: reached end of file while parsing
}
^
1 error
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.