submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s119463214 | p00528 | C++ | #include<bits/stdc++.h>
using namespace std;
#define MAX 200005
typedef long long ll;
typedef pair<ll,ll> P;
struct edge{
ll to,cost;
edge(ll t,ll c){
to=t,cost=c;
}
};
struct state{
ll pos,flg,cost;
state(ll p,ll f,ll c){
pos=p,flg=f,cost=c;
}
bool operator < (const state &p)const{
return cos... | a.cc: In function 'll solve()':
a.cc:52:31: error: expected primary-expression before ')' token
52 | if(res==10000000000000000LL;)return -1;
| ^
a.cc:54:1: warning: control reaches end of non-void function [-Wreturn-type]
54 | }
| ^
|
s456486726 | p00528 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<functional>
#include<vector>
#include<queue>
using namespace std;
??
struct room{
????int roomnum;
????bool visited;
??????
????bool operator>(const room compared) const
????{
????????return roomnum > compared.roomnum;
????}
????bool operator<(const room ... | a.cc:8:1: error: expected unqualified-id before '?' token
8 | ??
| ^
a.cc:22:1: error: expected unqualified-id before '?' token
22 | ??
| ^
a.cc:37:1: error: expected unqualified-id before '?' token
37 | ??
| ^
a.cc:39:8: error: 'room' was not declared in this scope
39 | vector<room> ns[1... |
s797226067 | p00528 | C++ | #include<bits/stdc++.h>
#define PB push_back
#define MP make_pair
using namespace std;
typedef long long int LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
struct room
{
int num;
bool visited[2];
bool operator<(const room r) const
{
return num < r.num;
}
bool operator>(const room r) const
... | a.cc:90:3: error: expected unqualified-id before 'return'
90 | return -1;
| ^~~~~~
a.cc:91:1: error: expected declaration before '}' token
91 | }
| ^
a.cc: In function 'LL dijk()':
a.cc:89:3: warning: control reaches end of non-void function [-Wreturn-type]
89 | }
| ^
|
s912750596 | p00528 | C++ | #include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
int H, W, K, X, Y;
vector<pair<int, int> > xc[100000]; int xs[100000];
vector<pair<int, int> > yc[100000]; int ys[100000];
vector<pair<int, int> > G[200002]; long long D[200002];
int main()
{
sca... | a.cc: In function 'int main()':
a.cc:91:9: error: 'memset' was not declared in this scope
91 | memset(D, -1, sizeof(D)); D[0] = 0;
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <functional>
+++ |+#i... |
s786135845 | p00528 | C++ | #include <cstdio>
#include <algorithm>
#include <vector>
#include <utility>
#include <queue>
using namespace std;
const int MAX_M=100000,MAX_N=100000,MAX_K=200000;
struct P{
int x,y;
int index;
};
bool comp(const P &a,const P &b){
if (a.y!=b.y){
return a.y<b.y;
}
return a.x<b.x;
}
bool comp2(const P &a,cons... | a.cc: In function 'int main()':
a.cc:91:53: error: expected ';' before '}' token
91 | G[p[i+1].index].push_back(e)
| ^
| ;
92 | }
| ~ ... |
s915314955 | p00528 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n... | a.cc: In function 'int main()':
a.cc:81:24: error: template argument 1 is invalid
81 | priority_queue<data>que;
| ^
a.cc:81:24: error: template argument 2 is invalid
a.cc:81:24: error: template argument 3 is invalid
a.cc:82:9: error: request for member 'push' in 'que', which is of no... |
s058538053 | p00528 | C++ | #include<iostream>
#include<queue>
#include<stdio.h>
#include<utility>
using namespace std;
#define MAX_N 100000
#define MAX_M 100000
#define INF 1000000
typedef pair<int, int> P; //?????????????????????
bool s[MAX_N * MAX_M]; //?????????????????????????????????
int M, N, K;
int d[MAX_N * MAX_M][2]; // ??????????... | a.cc:13:14: warning: integer overflow in expression of type 'int' results in '1410065408' [-Woverflow]
13 | bool s[MAX_N * MAX_M]; //?????????????????????????????????
| ^
a.cc:13:14: error: size of array 's' exceeds maximum object size '9223372036854775807'
a.cc:15:13: warning: integer overflow i... |
s488107084 | p00528 | C++ | #include<iostream>
#include<queue>
#include<stdio.h>
#include<utility>
using namespace std;
#define MAX_N 100000
#define MAX_M 100000
#define INF 1000000
typedef pair<int, int> coord; //??§?¨?
typedef pair<coord, int> P; //??§?¨??????????
bool s[MAX_M][MAX_N]; //?????????????????????????????????
int M, N, K;
int ... | /tmp/cc1Q4eA1.o: in function `main':
a.cc:(.text+0xf): relocation truncated to fit: R_X86_64_PC32 against symbol `K' defined in .bss section in /tmp/cc1Q4eA1.o
a.cc:(.text+0x19): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/cc1Q4eA1.o
a.cc:(.text+0x23): relocation trunca... |
s550159061 | p00528 | C++ | #include <queue>
#include <vector>
#include <iostream>
using namespace std;
struct p1 {
int idx, x, y;
};
bool operator<(const p1& r1, const p1& r2) {
if (r1.y != r2.y) return r1.y < r2.y;
return r1.x < r2.x;
}
struct edge {
int to; long long cost; int type;
};
bool operator<(const edge& e1, const edge& e2) {
retu... | a.cc: In function 'int main()':
a.cc:29:37: error: 'sort' was not declared in this scope; did you mean 'short'?
29 | for (int i = 0; i < W; i++) sort(ex[i].begin(), ex[i].end());
| ^~~~
| short
a.cc:30:37: error: 'sort' was n... |
s727763209 | p00528 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
using nam... | a.cc: In function 'long long int dfs(long long int, long long int)':
a.cc:41:13: error: redeclaration of 'long long int p1'
41 | int p1 = on ? lower_bound(fld.begin(), fld.end(), MP(fld[n].FI, -INF)) - fld.begin() : lower_bound(fld.begin(), fld.end(), MP(-INF, fld[n].SE)) - fld.begin();
| ^... |
s097010989 | p00528 | C++ | #include<bits/stdc++.h>
#define INF 0x3f3f3f3f3f3f3f3f
#define rep(i,n)for(int i=0;i<(int)(n);i++)
using namespace std;
typedef long long ll;
ll d[200000][2];
int x[200000],y[200000];
vector<int>X[100000],Y[100000];
struct st{
int p;bool b;ll c;
};
bool operator<(st&a,st&b)->const{
return a.c>b.c;
}
int main() {
in... | a.cc:13:28: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
13 | bool operator<(st&a,st&b)->const{
| ^~~~~
a.cc:13:1: error: 'operator<' function with trailing return type not declared with 'auto' type specifier
13 | bool operator<(st&a,st&b)->const{
... |
s045279326 | p00528 | C++ | #include<bits/stdc++.h>
#define INF 0x3f3f3f3f3f3f3f3f
#define rep(i,n)for(int i=0;i<(int)(n);i++)
using namespace std;
typedef long long ll;
ll d[200000][2];
int x[200000],y[200000];
vector<int>X[100000],Y[100000];
struct st{
int p;bool b;ll c;
};
bool operator<(const st&a,const st&b){
return a.c>b.c;
}
int... | a.cc: In function 'int main()':
a.cc:20:18: error: request for member 'resize' in 'x[i]', which is of non-class type 'int'
20 | rep(i,m)x[i].resize(2000);
| ^~~~~~
a.cc:21:18: error: request for member 'resize' in 'y[i]', which is of non-class type 'int'
21 | rep(i,n)y[i].resize(200... |
s984205052 | p00528 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<stack>
#include<functional>
#include<list>
#include<map>
#define P pair<int,int>
#define int long long
#define INF LLONG_MAX/3
using namespace std;
vector<P>rinsetu[250000];//cost to
int min... | a.cc: In function 'int main()':
a.cc:14:13: error: 'LLONG_MAX' was not declared in this scope
14 | #define INF LLONG_MAX/3
| ^~~~~~~~~
a.cc:52:44: note: in expansion of macro 'INF'
52 | fill(mincost, mincost + c * 2 + 2, INF);
| ^~~
a.cc:1... |
s398372726 | p00528 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<stack>
#include<functional>
#include<list>
#include<map>
#define P pair<int,int>
#define int long long
#define INF LLONG_MAX/3
using namespace std;
vector<P>rinsetu[1000000];//cost to
int mi... | a.cc: In function 'int main()':
a.cc:14:13: error: 'LLONG_MAX' was not declared in this scope
14 | #define INF LLONG_MAX/3
| ^~~~~~~~~
a.cc:52:44: note: in expansion of macro 'INF'
52 | fill(mincost, mincost + c * 2 + 2, INF);
| ^~~
a.cc:1... |
s735230189 | p00528 | C++ | #include <bits/stdc++.h>
#define int long long
#define INF 1145141919810LL
#define MAX_K 200005
using namespace std;
struct Edge {
int to, cost;
};
struct Node {
int dir, num, dst;
bool operator<(const Node &r) const {
return dst > r.dst;
}
};
struct Point {
int num, p, pp;
bool op... | a.cc:42:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
42 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:125:45: error: request for member 'size' in 'edge[0][now.Node::num]', which is of non-class type 'Edge [4]'
125 | for(int j = 0; j < edge[0][now.num].size()... |
s127099635 | p00528 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define F first
#define S second
#define pb push_back
#define Rep(i, N) for(int i = 0; i < N; i++)
#define INF 1 << 28
#define LLINF 1LL << 60
typedef pair<int,int> Pi;
typedef pair<int,Pi> Ti;
struct Edge {
int to, cost;
};
int sz[2], K;
vector<Ed... | a.cc: In function 'void Dijkstra()':
a.cc:28:12: error: 'mv' was not declared in this scope; did you mean 'v'?
28 | if(w > mv[t][v]) continue;
| ^~
| v
|
s513445529 | p00528 | C++ | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
const int inf = 1e9 + 9;
typedef pair<int, int> P;
typedef pair<int, P> PP;
struct edge
{
edge() {}
edge (int t, int v, int c) { to = t; f = v; cost = c; }
int to, f, cost;
};
int h, w, k;
vector<PP> a, b;
vector<edge> G[2][2020... | a.cc: In function 'int main()':
a.cc:97:4: error: expected '}' at end of input
97 | }
| ^
a.cc:50:1: note: to match this '{'
50 | {
| ^
|
s645781640 | p00528 | C++ | #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <cmath>
#include <map>
#include <set>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define INF_LL 1e18
#define INF 1e9
#define REP(i, n) for(int i = ... | a.cc: In function 'int main()':
a.cc:88:17: error: 'pq' was not declared in this scope
88 | pq.push({X[0][i].first+1, {X[0][i].second, 1}});
| ^~
a.cc:94:25: error: 'pq' was not declared in this scope
94 | pq.push({Y[0][i].first+1, {Y[0][i].second, 0}}... |
s537019190 | p00528 | C++ | #include <iostream>
#include <queue>
#include <vector>
#include <set>
#include <algorithm>
#define INF 1001001001001001001
using namespace std;
typedef long long ll;
typedef pair<int,int> pa;
typedef pair<ll,pa > ppa;
vector<pa> ve[2][100010];
int swi[2][200010];
ll res[2][200010];
int main(){
int M,N,K;
cin>>M>>N>>... | a.cc: In function 'int main()':
a.cc:43:42: error: request for member 'first' in 'que.std::priority_queue<std::pair<long long int, std::pair<int, int> > >::top().std::pair<long long int, std::pair<int, int> >::first', which is of non-class type 'const long long int'
43 | int yota=que.top().first.firs... |
s896498544 | p00529 | C++ | #include <iostream>
#include <string>
using namespace std;
int main (){
string str;
int n,jcnt=0,ocnt=0,icnt=0,joicnt=0,ioicnt=0,ans=0;
cin>>n;
cin>>str;
for(int i=0;i<n;i++){
if(str[i]=='J') jcnt++;
else if(str[i]=='I'){
if(joicnt || ioicnt && ocnt==0 ) ans++;
if(jcnt && ocnt) joicnt++,... | a.cc: In function 'int main()':
a.cc:16:18: error: expected ';' before '}' token
16 | else icnt++
| ^
| ;
17 | }
| ~
|
s982688190 | p00529 | C++ | #include <iostream>
using namespace std;
//J=0,O=1,I=2
int N;
int ary[1000010];
int joichec(int numJ,int numI,int& fla){
int cntJ=0,cntJO=0,cntJOI=0;
int cntI=0,cntOI=0,cntJOI2=0;
for(int i=0;i<N;i++){
switch(ary[i]){
case 0:
cntJ++;
break;
case 1:
if(cntJ>0){
cntJ--;
cntJO++;
}
... | a.cc: In function 'int main()':
a.cc:108:34: error: expected ';' before ')' token
108 | for(int i=0;i<=numofI,i++){
| ^
| ;
a.cc:109:53: error: expected ')' before ';' token
109 | hog=max(hog,joichec(i,numofI-i,fla... |
s296948806 | p00529 | C++ | int start;
string str;
bool solve(int x){
int ic = 0,oc = 0,jc = 0;
for(int i = start; i < n; i++){
if(str[i] == 'I'){
if(x > ic)ic++;
else if(oc > jc){
jc++;
if(jc >= x)return true;
}
}
if(str[i] == 'O'){
if(ic > oc)oc++;
}
if(str[i] == 'J'){
if(o... | a.cc:3:1: error: 'string' does not name a type
3 | string str;
| ^~~~~~
a.cc: In function 'bool solve(int)':
a.cc:7:26: error: 'n' was not declared in this scope
7 | for(int i = start; i < n; i++){
| ^
a.cc:8:8: error: 'str' was not declared in this scope; did you mean 'st... |
s229253333 | p00529 | C++ | #include<iostream>
#include<string>
using namespace std;
int n;
string str;
bool check(int num) {
int a = 0, b = 0, c = 0;
for (int i = n - 1; i > -1; --i) {
if (str[i] == 'I') {
if (a < num)++a;
else if (c < b)++c;
}
else if (str[i] == 'O') {
if (b < a) {
++b;
}
else if (c < b)++c;
}
if (c ... | a.cc: In function 'bool check(int)':
a.cc:22:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
22 | int main() {
| ^~
a.cc:22:9: note: remove parentheses to default-initialize a variable
22 | int main() {
| ^~
| --
a.cc:22:9: note... |
s122645149 | p00529 | C++ | object Main extends App {
import scala.io.StdIn.{readLine}
val n = readLine().toInt
println(makeJOIOI(readLine().toList))
def makeJOIOI(str:List[Char]):Int = {
var pile = str
var j = 0
var i = 0
var jo = 0
var io = 0
var joi = 0
var ioi = 0
var joio = 0
var ioio = 0
while... | a.cc:17:21: error: extended character ⇒ is not valid in an identifier
17 | case 'J'::t ⇒
| ^
a.cc:20:21: error: extended character ⇒ is not valid in an identifier
20 | case 'I'::t ⇒
| ^
a.cc:39:21: error: extended character ⇒ is not valid in an i... |
s027300394 | p00530 | C++ | #include<stdio.h>
#include<algorithm>
using namespace std;
int b[110000];
int z[110000];
long long bit[110000];
long long sum(int a,int b){
if(a)return sum(0,b)-sum(0,a-1);
long long ret=0;
for(;b>=0;b=(b&(b+1))-1)ret+=bit[b];
return ret;
}
void add(int a,int b){
for(;a<110000;a|=a+1)bit[a]+=b;
}
int segtree[26214... | a.cc: In function 'int main()':
a.cc:116:56: error: invalid conversion from 'int*' to 'int' [-fpermissive]
116 | int rim=lower_bound(lx,lx+ls,i)-1;
| ~~~~~~~~~~~~~~~~~~~~~~~^~
| |
| ... |
s981825610 | p00530 | C++ | #include<stdio.h>
#include<algorithm>
using namespace std;
int b[110000];
int z[110000];
long long bit[110000];
long long sum(int a,int b){
if(a)return sum(0,b)-sum(0,a-1);
long long ret=0;
for(;b>=0;b=(b&(b+1))-1)ret+=bit[b];
return ret;
}
void add(int a,int b){
for(;a<110000;a|=a+1)bit[a]+=b;
}
int segtree[26214... | a.cc: In function 'int main()':
a.cc:101:70: error: 'j' was not declared in this scope
101 | int rim=lower_bound(lx,lx+ls,j)-lx-1;
| ^
|
s303902905 | p00530 | C++ | #include<iostream>
#include<algorithm>
#include<complex>
using namespace std;
int a[100001],b[100001],c[100001];
bool m[100001];
int main(){
int n;
cin>>n;
bool s=true;
for(int i=0;i<n;i++){
cin>>a[i];
if(i>0)if(a[i]<a[i-1])s=false;
b[i]=a[i];
m[i]=true;
}
if(n<=2||s==true)cout<<"1"<<endl;
else{
long lo... | a.cc:52:18: error: expected constructor, destructor, or type conversion before ';' token
52 | getchar();
| ^
a.cc:53:18: error: expected constructor, destructor, or type conversion before ';' token
53 | getchar();
| ^
a.cc:54:9: error: expected unquali... |
s409089253 | p00530 | C++ | #include<iostream>
#include<algorithm>
#include<complex>
using namespace std;
int a[100001],b[100001],c[100001];
bool m[100001];
int main(){
int n;
cin>>n;
bool s=true;
for(int i=0;i<n;i++){
cin>>a[i];
if(i>0)if(a[i]<a[i-1])s=false;
b[i]=a[i];
m[i]=true;
}
if(n<=2||s==true)cout<<"1"<<endl;
else{
long lo... | a.cc:52:9: error: expected unqualified-id before 'return'
52 | return 0;
| ^~~~~~
a.cc:53:1: error: expected declaration before '}' token
53 | }
| ^
|
s257249000 | p00530 | C++ | q | a.cc:1:1: error: 'q' does not name a type
1 | q
| ^
|
s436548984 | p00530 | C++ | q | a.cc:1:1: error: 'q' does not name a type
1 | q
| ^
|
s971912782 | p00530 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> ii;
const int N = 100005;
int n, m;
int a[N];
int bit[N];
int it[4 * N];
int lz[4 * N];
vector<int> val;
vector<int> v[N];
vector<int> start;
vector<int> finish;
void upd(int x) {
for (int i = x; i > 0; i -= i & -i) bit[i]++;
}
int get(int x) ... | a.cc: In function 'int main()':
a.cc:90:30: error: expected ';' before 'return'
90 | cout << "0\n" return 0;
| ^~~~~~~
| ;
a.cc:93:22: error: expected ';' before 'return'
93 | cout << "1\n" return 0;
| ... |
s832143513 | p00530 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> ii;
const int N = 100005;
int n, m;
int a[N];
int bit[N];
int it[4 * N];
int lz[4 * N];
vector<int> val;
vector<int> v[N];
vector<int> start;
vector<int> finish;
void upd(int x) {
for (int i = x; i > 0; i -= i & -i) bit[i]++;
}
int get(int x) ... | a.cc: In function 'int main()':
a.cc:90:30: error: expected ';' before 'return'
90 | cout << "0\n" return 0;
| ^~~~~~~
| ;
|
s777199396 | p00530 | C++ | import copy
def main():
N = int(input())
A = []
for _ in range(N):
A.append(int(input()))
A_s = sorted(A) #A_sorted
n = 0
for x in range(N):
n += (N - 1) - x
B = []
for x in range(N - 1):
for y in range(x + 1, N):
hoge = copy.deepcopy(A)
... | a.cc:8:23: error: stray '#' in program
8 | A_s = sorted(A) #A_sorted
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import copy
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s831246298 | p00531 | Java | import java.io.*;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
int a=Integer.parseInt(line);
... | Main.java:21: error: reached end of file while parsing
}
^
1 error
|
s026497362 | p00531 | Java | class Main{
public static void main(String[] args){
if(p*a-(p-c)*d+b)>0;
System.out.println((p-c)*d+d);
else System.out.println(p*a)
}
} | Main.java:4: error: illegal start of expression
if(p*a-(p-c)*d+b)>0;
^
Main.java:6: error: ';' expected
else System.out.println(p*a)
^
Main.java:6: error: 'else' without 'if'
else System.out.println(p*a)
^
3 errors
|
s954652616 | p00531 | C | #include<stdio.h>
int main(void)
{
int a,b,c,d,p;
scanf("%d",a);
scanf("%d",b);
scanf("%d",c);
scanf("%d",d);
scanf("%d",p);
x=p * a;
if(p < c){
y=b;
}
else{
y=b + (p - c) * d;
}
if(x < y){
printf("%d\n",y);
}
else{
printf("%d\n",x);
| main.c: In function 'main':
main.c:10:17: error: 'x' undeclared (first use in this function)
10 | x=p * a;
| ^
main.c:10:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:17: error: 'y' undeclared (first use in this function)
... |
s235679488 | p00531 | C | #include<stdio.h>
int main() {
int a, b, c, d, p, sum1 = 0, sum2 =0;
scanf("%d %d %d %d %d", a, b, c, d, p);
sum1 = a * p;
if(p > c) {
sum2 = b + (p - c) * d);
}else{
sum2 = b;
}
if(sum1 < sum2) {
printf("%d\n", sum1);
}else{
printf("%d\n", sum2);
}
return 0;
} | main.c: In function 'main':
main.c:7:27: error: expected ';' before ')' token
7 | sum2 = b + (p - c) * d);
| ^
| ;
main.c:7:27: error: expected statement before ')' token
|
s727339456 | p00531 | C | #include<stdio.h.>
int main()
{
int A, B,C,D, P;
int X, Y;
scanf("%d%d%d%d%d", &A, &B, &C, &D, &P);
X = A * P;
if(P <= C){
Y = C;
} else {
Y = B + (P-C) * D;
}
if(X < Y)
printf("%d\n", X);
else
printf("%d\n", Y);
return 0;
} | main.c:1:9: fatal error: stdio.h.: No such file or directory
1 | #include<stdio.h.>
| ^~~~~~~~~~
compilation terminated.
|
s570831448 | p00531 | C | #include<stdio.h.>
int main()
{
int A, B,C,D, P;
int X, Y;
scanf("%d%d%d%d%d", &A, &B, &C, &D, &P);
X = A * P;
if(P <= C){
Y = B;
} else {
Y = B + (P-C) * D;
}
if(X < Y)
printf("%d\n", X);
else
printf("%d\n", Y);
return 0;
} | main.c:1:9: fatal error: stdio.h.: No such file or directory
1 | #include<stdio.h.>
| ^~~~~~~~~~
compilation terminated.
|
s585636543 | p00531 | C | #include <stdio.h>
int main(void) {
int P = 0;
int A = 0;
int B = 0;
int C = 0;
int D = 0;
scanf("%d %d %d %d %d", &A, &B, &C, &D, &P);
int X = A * P;
int Y = B;
int y = (P - C)*D + B;
if (P <= C) {
if (X >= Y) printf("%d\n",Y);
else if(X < Y) printf("%d\n", X);
}
if (P > C) {
if (X >= y)printf(... | main.c: In function 'main':
main.c:26:9: error: expected declaration or statement at end of input
26 | return 0;
| ^~~~~~
|
s916208464 | p00531 | C | #include <stdio.h>
int main(void) {
int P = 0;
int A = 0;
int B = 0;
int C = 0;
int D = 0;
scanf("%d %d %d %d %d", &A, &B, &C, &D, &P);
int X = A * P;
int Y = B;
int y = (P - C)*D + B;
if (P <= C) {
if (X >= Y) printf("%d\n",Y);
else if(X < Y) printf("%d\n", X);
}
if (P > C) {
if (X >= y)printf(... | main.c: In function 'main':
main.c:26:9: error: expected declaration or statement at end of input
26 | return 0;
| ^~~~~~
|
s598403401 | p00531 | C | #include <stdio.h>
#include <stdlib.h>
int main(void)
{
int xa;
int yb, yc, yd;
int p;
scanf("%d %d %d %d %d", &xa, &yb, &yc, &yd, &p);
xa = p * xa;
if (yc < p){
yb += (p - yc) * yd;
}
printf("%d\n", min(xa, yb));
return (0);
} | main.c: In function 'main':
main.c:19:24: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
19 | printf("%d\n", min(xa, yb));
| ^~~
| main
|
s306044717 | p00531 | C | #include <stdio.h>
#include <stdlib.h>
int main(void)
{
int A;
int B, C, D;
int P;
scanf("%d %d %d %d %d", &A, &B, &C, &D, &P);
A = P * A;
if (C < P){
B += (P - C) * D;
}
printf("%d\n", min(A, B));
return (0);
} | main.c: In function 'main':
main.c:19:24: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
19 | printf("%d\n", min(A, B));
| ^~~
| main
|
s297222268 | p00531 | C | 8
300
100
10
250 | main.c:1:1: error: expected identifier or '(' before numeric constant
1 | 8
| ^
|
s848676012 | p00531 | C | #include <stdio.h>
#include <stdlib.h>
int main(void)
{
int A;
int B, C, D;
int P;
int MIN;
scanf("%d %d %d %d %d", &A, &B, &C, &D, &P);
A = P * A;
if (C < P){
B += (P - C) * D;
}
MIN = min(A, B);
printf("%d\n", MIN);
return (0);
} | main.c: In function 'main':
main.c:20:15: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
20 | MIN = min(A, B);
| ^~~
| main
|
s846554612 | p00531 | C | #include<stdio.h>
int main(){
int(a,b,c,d,p,x,y)
x=a*p
if(p<=c){
y=b
}
else{
y=b+d*(p-c)
}
if(x<=y){
printf("%d\n",x)
}
else{
printf("%d\n",y)
}
return 0
} | main.c: In function 'main':
main.c:3:14: error: expected ')' before ',' token
3 | int(a,b,c,d,p,x,y)
| ^
| )
main.c:8:1: error: 'else' without a previous 'if'
8 | else{
| ^~~~
main.c:9:1: error: 'y' undeclared (first use in this function)
9 | y=b+d*(p-c)
... |
s174237983 | p00531 | C | a;main(b,c,d,e){scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);b+=e>c?e*d-c*d:;a=!printf("%d\n",a*e<b?a*e:b);} | main.c:1:1: warning: data definition has no type or storage class
1 | a;main(b,c,d,e){scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);b+=e>c?e*d-c*d:;a=!printf("%d\n",a*e<b?a*e:b);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimpl... |
s092737172 | p00531 | C | a;main(b,c,d,e){scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);b+=e>c?e*d-c*d;a=!printf("%d\n",a*e<b?a*e:b);} | main.c:1:1: warning: data definition has no type or storage class
1 | a;main(b,c,d,e){scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);b+=e>c?e*d-c*d;a=!printf("%d\n",a*e<b?a*e:b);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimpli... |
s678965549 | p00531 | C | #inclue<stdio.h>
int main( void ) {
int A ; // 1L * A
int B ; // kihon
int C ; // seigen
int D ; // +1L * D
int P ; // L
int X, Y ;
scanf( "%d %d %d %d %d", &A, &B, &C, &D, &P ) ;
X = A * P ;
if( P > C )
{
Y = (( P - C ) * D ) + B ;
}
else
{
Y = B ;
}
if( X > Y )
{
printf( "%d\n", Y ) ;
}
if( X ... | main.c:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
1 | #inclue<stdio.h>
| ^~~~~~
| include
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
9 | scanf( "%d %d %d %d %d", &A, &B, &C, &D, ... |
s665837034 | p00531 | C | #inclue<stdio.h>
int main( void ) {
int A ; // 1L * A
int B ; // kihon
int C ; // seigen
int D ; // +1L * D
int P ; // L
int X, Y ;
scanf( "%d %d %d %d %d", &A, &B, &C, &D, &P ) ;
X = A * P ;
if( P > C )
{
Y = (( P - C ) * D ) + B ;
}
else
{
Y = B ;
}
if( X > Y )
{
printf( "%d\n", Y ) ;
}
if( X ... | main.c:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
1 | #inclue<stdio.h>
| ^~~~~~
| include
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
9 | scanf( "%d %d %d %d %d", &A, &B, &C, &D, ... |
s189275858 | p00531 | C++ | #include <bits/stdc++.h>
typedef long long LL;
using namespace std;
int main(){
int A, B, C, D, E;
cin >> A >> B >> C >> D >> E;
int X = A * P;
int Y = B + D * max(0, C - B);
cout << min(X, Y) << endl;
}
| a.cc: In function 'int main()':
a.cc:8:15: error: 'P' was not declared in this scope
8 | int X = A * P;
| ^
|
s093632017 | p00531 | C++ | #include <bits/stdc++.h>
typedef long long LL;
using namespace std;
int main(){
int A, B, C, D, E;
cin >> A >> B >> C >> D >> P;
int X = A * P;
int Y = B + D * max(0, C - B);
cout << min(X, Y) << endl;
}
| a.cc: In function 'int main()':
a.cc:7:30: error: 'P' was not declared in this scope
7 | cin >> A >> B >> C >> D >> P;
| ^
|
s198123428 | p00531 | C++ | #include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
int a,b,c,d,e;
scanf("%d%d%d%d%d",&a,&b,&c,&d,&p);
printf("%d\n",min(a,b+max(0,p-c)*d));
} | a.cc: In function 'int main()':
a.cc:6:41: error: 'p' was not declared in this scope
6 | scanf("%d%d%d%d%d",&a,&b,&c,&d,&p);
| ^
|
s148544314 | p00531 | C++ | #include <iostream>
using namespace std;
int main() {
int x,y,a,b,c,d;
cin >> a;
cin >> b;
cin>>c;
cin>>d;
cin>>p;
x=a*p;
if(p<=c){y=b;}
else{y=b+y*d-c*d;}
if(x<=y){cout<<x<<endl;}
else{cout<<y<<endl;}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:6: error: 'p' was not declared in this scope
10 | cin>>p;
| ^
|
s065716909 | p00531 | C++ | #include <stdio.h>
int main(){
int a,b,c,d,p,x,y;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&p);
x=a*p;
if(p<=c){
y=b;
}
else {
y=(p-c)*d+b
}
for(i=0;i<5;i++){
scanf("%d
printf("%d\n",ave);
return 0;
} | a.cc:18:15: warning: missing terminating " character
18 | scanf("%d
| ^
a.cc:18:15: error: missing terminating " character
18 | scanf("%d
| ^~~
a.cc: In function 'int main()':
a.cc:15:20: error: expected ';' before '}' token
15 | y=(p-c)*d+b
... |
s222544485 | p00531 | C++ | #include<iostream>
int main(){
int a,b,c,d,p;
int x=0;
int y=0;
std::cin>>a>>b>>c>>d>>p;
x+=a*p;
y+=b;
if(c<p)y+=(p-c)*d;
if(x>y)
std::cout<<x<<std::endl;
else std::cout<<y<<st::endl;
} | a.cc: In function 'int main()':
a.cc:12:20: error: 'st' has not been declared
12 | else std::cout<<y<<st::endl;
| ^~
|
s088249166 | p00531 | C++ | #include <stdio.h>
#include <stdlib.h>
int main(void)
{
int xa;
int yb, yc, yd;
int p;
scanf("%d %d %d %d %d", &xa, &yb, &yc, &yd, &p);
xa = p * xa;
if (yc < p){
yb += (p - yc) * yd;
}
printf("%d\n", min(xa, yb));
return (0);
} | a.cc: In function 'int main()':
a.cc:19:24: error: 'min' was not declared in this scope; did you mean 'main'?
19 | printf("%d\n", min(xa, yb));
| ^~~
| main
|
s651506221 | p00531 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c,d,p,x,y;
cin>>a>>b>>c>>d>>p;
x=p*a;
if(p<=c){
y=b;
}else{
y=b+((p-c)*d);
}
if(x<=y)cout<<x<<endl;else cout<<y<<endl;
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
13 | cout<<ans<<endl;
| ^~~
| abs
|
s614233648 | p00531 | C++ | a;main(b,c,d,e){scanf("%d%d%d%d%d", &a,&b,&c,&d,&e);a=!printf("%d\n",a*e<b+(e>c?e:c)*d?a*e:b+(e>c?e:c)*d);} | a.cc:1:1: error: 'a' does not name a type
1 | a;main(b,c,d,e){scanf("%d%d%d%d%d", &a,&b,&c,&d,&e);a=!printf("%d\n",a*e<b+(e>c?e:c)*d?a*e:b+(e>c?e:c)*d);}
| ^
a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token
1 | a;main(b,c,d,e){scanf("%d%d%d%d%d", &a,&b,&c,&d,&e);a=!pr... |
s496232337 | p00531 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int a,b,c,d,e;
cin<<a<<b<<c<<d<<e;
cout<<min(e*a,b+(c<e?(e-c)*d:0))<<endl;
} | a.cc: In function 'int main()':
a.cc:7:5: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
7 | cin<<a<<b<<c<<d<<e;
| ~~~^~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:7:5: note: candidate: 'operato... |
s010592000 | p00531 | C++ | #include <iostream>
using namespace std;
int main() {
int A,B,C,D,P,S=0,T=0;
cin >> A >> B >> C >> D>> P;
if (C>P){
S=A*P;
}
else{
T=B+(P-C)*D;
}
if (S=<T){
cout<< S << endl;
}
else {
cout<< T << endl;
}
// your code goes here
return 0;
} | a.cc: In function 'int main()':
a.cc:14:15: error: expected primary-expression before '<' token
14 | if (S=<T){
| ^
|
s327860092 | p00531 | C++ | #include <iostream>
using namespace std;
int main() {
int A,B,C,D,P,S=0,T=0;
cin >> A >> B >> C >> D>> P;
S=A*P;
T=B+(P-C)*D;
if (S=<T){
cout<< S << endl;
}
else {
cout<< T << endl;
}
// your code goes here
return 0;
} | a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before '<' token
8 | if (S=<T){
| ^
|
s451603184 | p00531 | C++ | #include <iostream>
using namespace std;
int main() {
int A,B,C,D,P,S=0,T=0;
cin >> A >> B >> C >> D>> P;
if (P<=C:S<=T){
S=A*P;
cout<< S << endl;
}
else {
T=B+(P-C)*D;
cout<< T << endl;
}
// your code goes here
return 0;
} | a.cc: In function 'int main()':
a.cc:6:17: error: found ':' in nested-name-specifier, expected '::'
6 | if (P<=C:S<=T){
| ^
| ::
a.cc:6:16: error: 'C' is not a class, namespace, or enumeration
6 | if (P<=C:S<=T){
| ^
|
s058276897 | p00531 | C++ | #include <cmath>
using namespace std;
int main() {
int A,B,C,D,P;
int X=0,Y=0;
cin >> A >> B >> C >> D>> P;
X=A*P;
Y=B+(P-C)*D;
int S=P-C;
if(S<=0){
Y=B;
}
if(X>Y){
cout<< Y <<endl;
}
else {
cout<< X << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
6 | cin >> A >> B >> C >> D>> P;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <cmath>
+++ |+#include <iostrea... |
s150908933 | p00531 | C++ | #include<stdio.h>
int main(void)
{
int a,b,c,d,e;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
printf("%d\n",(g*a)>(c+(e*d)));
else {
printf("%d\n",(c+(e*d))>g*a);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:24: error: 'g' was not declared in this scope
10 | printf("%d\n",(g*a)>(c+(e*d)));
| ^
a.cc:11:9: error: 'else' without a previous 'if'
11 | else {
| ^~~~
|
s818250370 | p00531 | C++ | #include<stdio.h>
int main(void)
{
int a,b,c,d,e;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
printf("%d\n",(g*a)>(c+(e*d)));
else {
printf("%d\n",(c+(e*d))>g*a);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:24: error: 'g' was not declared in this scope
10 | printf("%d\n",(g*a)>(c+(e*d)));
| ^
a.cc:11:9: error: 'else' without a previous 'if'
11 | else {
| ^~~~
|
s866609214 | p00531 | C++ | #include<stdio.h>
int main(void)
{
int a,b,c,d,e,z,x;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
z=e*a;
x=b+d*(e-c);
if(z>x)
printf("%d\n",z);
else if(x>z){
printf("%d\n",x)
}
return 0;
} | a.cc: In function 'int main()':
a.cc:15:29: error: expected ';' before '}' token
15 | printf("%d\n",x)
| ^
| ;
16 | }
| ~
|
s477466695 | p00531 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int a, b, c, d, p, X, Y;
cin >> a >> b >> c >> d >> p;
X = a*p;
if (p <= c){
Y = b;
}
else{
p - c;
Y = c*d + b;
}
if (Y < X){
cout << Y << endl;
}
else{
cout << X << endl;
} | a.cc: In function 'int main()':
a.cc:24:18: error: expected '}' at end of input
24 | }
| ^
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s185784222 | p00531 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int a, b, c, d, p, X, Y;
cin >> a >> b >> c >> d >> p;
X = a*p;
if (p <= c){
Y = b;
}
else{
p - c;
Y = c*d + b;
}
if (Y < X){
cout << Y << endl;
}
else{
cout << X << endl;
} | a.cc: In function 'int main()':
a.cc:24:18: error: expected '}' at end of input
24 | }
| ^
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s143385486 | p00531 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int a, b, c, d, p, X, Y, ;
cin >> a >> b >> c >> d >> p;
X = a*p;
if (c <= p){
Y = b;
}
else{
p - c;
Y = d*(p-c);
}
if (Y < X){
cout << Y << endl;
}
else{
cout << X << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:34: error: expected unqualified-id before ';' token
8 | int a, b, c, d, p, X, Y, ;
| ^
|
s740539257 | p00531 | C++ | #include <bits/stdc++.h>
using namespace std;
int a, b, c, d, e;
int main() {
cin >> a >> b >> c >> d >> e;
cout << min(a * e, max(b, b + (p - c) * d)) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:40: error: 'p' was not declared in this scope
6 | cout << min(a * e, max(b, b + (p - c) * d)) << endl;
| ^
|
s465791211 | p00531 | C++ | #include <bits/cstdc++.h>
using namespace std;
int a, b, c, d, p;
int x, y;
int main()
{
cin >> a >> b >> c >> d >> p;
x = p * a;
y = b;
if (p - c > 0) {
y += (p - c) * d;
}
if (x > y){
x = y;
}
cout << x << endl;
return 0;
} | a.cc:1:10: fatal error: bits/cstdc++.h: No such file or directory
1 | #include <bits/cstdc++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s417954335 | p00531 | C++ | #include<iostream>
nameapce using std;
int main(){
int a,b,c,d,p;
cin>>a>>b>>c>>d>>p;
if(a*c>b+d*(p-c)){
printf("%d",b+d*(p-c));
}
else{
printf("%d",a*c);
}
return 0;
} | a.cc:2:1: error: 'nameapce' does not name a type
2 | nameapce using std;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin>>a>>b>>c>>d>>p;
| ^~~
| std::cin
In file included from a.cc:1:
/us... |
s978569839 | p00531 | C++ | #include<iostream>
namespeace using std;
int main(){
int a,b,c,d,p;
cin>>a>>b>>c>>d>>p;
if(a*c>b+d*(p-c)){
printf("%d",b+d*(p-c));
}
else{
printf("%d",a*c);
}
return 0;
} | a.cc:2:1: error: 'namespeace' does not name a type; did you mean 'timespec'?
2 | namespeace using std;
| ^~~~~~~~~~
| timespec
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin>>a>>b>>c>>d>>p;
| ^~~
| ... |
s576923137 | p00531 | C++ | #include<iostream>
nameapce using std;
int main(){
int a,b,c,d,p;
cin>>a>>b>>c>>d>>p;
if(a*c>b+d*(p-c)){
printf("%d",b+d*(p-c));
}
else{
printf("%d",a*c);
}
return 0;
} | a.cc:2:1: error: 'nameapce' does not name a type
2 | nameapce using std;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin>>a>>b>>c>>d>>p;
| ^~~
| std::cin
In file included from a.cc:1:
/us... |
s714279615 | p00531 | C++ | #include<iostream>
#include<stdio.h>
#include<math.h>
int main(){
int a=0,b=0,c=0,d=0,p=0;
int e=0;
cin>>a>>b>>c>>d>>p;
if(p<=c){
e=b;
}
else{
e=b+(p-c)*d;
}
cout<<e<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>a>>b>>c>>d>>p;
| ^~~
| 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... |
s174000228 | p00531 | C++ | #include <bits/stdc++.h>
using namespace std;
#define llong long long
#define inf 999999999
#define mp make_pair
#define pb push_back
#define fn fill_n
typedef pair<int, int> P;
typedef pair<P, int> PP;
typedef pair<PP, int> PPP;
typedef struct data{
int now;
int cost;
}data;
int nh[4] = {1, 0, -1, 0};
int nw[4] = {... | a.cc: In function 'int main()':
a.cc:26:21: error: 'p' was not declared in this scope
26 | cout<<min(a*p,c+max(0,e-c)*d)<<endl;
| ^
|
s277645422 | p00531 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,p;
cin>>a>>b>>c>>d>>p;
int mizu1,mizu2,tuika;
tuika =0;
mizu1 = a*p;
if(p <= c){
mizu2 = b;
} else {
for(int x=0;x < p-c;x++){
tuika += d;
}
mizu2 = b + tuika;
}
if(mizu1 < mizu2){
pr... | a.cc: In function 'int main()':
a.cc:19:29: error: expected ';' before '}' token
19 | printf("%d \n", mizu1)
| ^
| ;
20 | } else {
| ~
a.cc:21:29: error: expected ';' before '}' token
21 | print... |
s029741714 | p00531 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,p;
cin>>a>>b>>c>>d>>p;
int mizu1,mizu2,tuika;
tuika =0;
mizu1 = a*p;
if(p <= c){
mizu2 = b;
} else {
for(int x=0;x < p-c;x++){
tuika += d;
}
mizu2 = b + tuika;
}
if(mizu1 < mizu2){
pr... | a.cc: In function 'int main()':
a.cc:19:29: error: expected ';' before ':' token
19 | printf("%d \n", mizu1):
| ^
| ;
a.cc:21:29: error: expected ';' before ':' token
21 | printf("%d \n", mizu2):
| ^
... |
s205388760 | p00532 | Java | import java.io.*;
import java.util.StringTokenizer;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReadrer(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!ine.isEmpty(... | Main.java:9: error: cannot find symbol
BufferedReader br=new BufferedReadrer(new InputStreamReader(System.in));
^
symbol: class BufferedReadrer
location: class Main
Main.java:11: error: cannot find symbol
while((line=br.readLine())!=null&&!ine.isEmpty()){
^... |
s001837722 | p00532 | Java | import java.util.Scanner;
public class JOI2014n2015yo2 {
private static Scanner s;
public static void main(String[] args) {
s = new Scanner(System.in);
int N = s.nextInt();
int M = s.nextInt();
int[] A = new int[M];
int num =0;
int targetpoint = 0;
int[] point = new int[N];
for(int i = 0;i < N;i++){... | Main.java:2: error: class JOI2014n2015yo2 is public, should be declared in a file named JOI2014n2015yo2.java
public class JOI2014n2015yo2 {
^
1 error
|
s696457725 | p00532 | C | #include<stdio.h>
int main(){
int n,m,i,j,target;
scanf("%d \n %d \n %d target",&n,&m,&target);
int data[100][100],score[100];
for(i = 1;i <= m;i++){
for(j = 1;j <= n;j++){
scanf("%d",data[i][m]);
}
}
printf("%d\n",score[]);
return 0;
} | main.c: In function 'main':
main.c:13:29: error: expected expression before ']' token
13 | printf("%d\n",score[]);
| ^
|
s711638526 | p00532 | C | #include <stdio.h>
int main()
{
int N, M;
int A[100];
int B[100][100];
int ans[100];
int i, j;
scanf("%d", &N);
scanf("%d", &M);
for(i=0; i<M; i++)
scanf("%d", &A[i]);
for(i=0; i<M; i++){
for(j=0; j<N; j++){
scanf("%d", &B[i][j]);
}
}
for(i=0; i<M; i++){
for(j=0; j<N; j+... | main.c: In function 'main':
main.c:35:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
35 | print("\n");
| ^~~~~
| printf
|
s465558368 | p00532 | C | /*??????????????????????????£???(Christmas Party)*/
#include <stdio.h>
int main(){
int i, j, x, y, z, N, M;
int A[100] = {0};
int B[100][100] = {0};
int data[100] = {0};
scanf("%d %d", &N, &M);
for (i = 1; i - 1 < M; i++) {
scanf("%d", &A[i - 1]);
}
for (i = 1; i - 1 < M; i++) {
for (j = 1; j - ... | main.c: In function 'main':
main.c:18:10: error: expected ';' before 'for'
18 | x = 0
| ^
| ;
19 | for (j = 1; j - 1 < N; j++) {
| ~~~
|
s347930894 | p00532 | C | /*??????????????????????????£???(Christmas Party)*/
#include <stdio.h>
int main(){
int i, j, x, N, M;
int A[100] = {0};
int B[100][100] = {0};
int data[100] = {0};
scanf("%d %d", &N, &M);
for (i = 1; i - 1 < M; i++) {
scanf("%d", &A[i - 1]);
}
for (i = 1; i - 1 < M; i++) {
for (j = 1; j - 1 < N;... | main.c: In function 'main':
main.c:18:10: error: expected ';' before 'for'
18 | x = 0
| ^
| ;
19 | for (j = 1; j - 1 < N; j++) {
| ~~~
|
s161327546 | p00532 | C | #include <stdio.h>
#include <string.h>
int main()
{
int n, m,
long int f[100][100];
int target[100];
int cnt[100] = { 0 };
int i, j;
scanf("%d%d", &n, &m);
for (i = 0;i < m;i++)
scanf("%d", &target[i]);
for (i = 0;i < m;i++)
for (j = 0;j < n;j++)
scanf("%d", &f[i][j]);
for (i = 0;i < m;i++) {
for (j ... | main.c: In function 'main':
main.c:7:9: error: expected identifier or '(' before 'long'
7 | long int f[100][100];
| ^~~~
main.c:16:38: error: 'f' undeclared (first use in this function)
16 | scanf("%d", &f[i][j]);
| ^
main.c... |
s040647031 | p00532 | C |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
int main(void){
int n, m, target[100], i, j, num, friend[100] = {0}, x = 0;
scanf("%d %d", &n, &m);
for (i = 0; i < m; i++){
scanf("%d", &target[i]);
}
for (i = 0; i < m; i++){
for (j = 0; j < n; j++){
... | main.c:2:1: error: expected identifier or '(' before numeric constant
2 | 1
| ^
In file included from /usr/include/stdio.h:47,
from main.c:22:
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:28:43: error: unknown type name 'size_t'
28 | ... |
s570091334 | p00532 | C++ | //2015
#include<iostream>
using namespace std;
int main(void){
int n,m,i,j,a;
cin>>n;
cin>>m;
int a[m+1],b[n+1];
for(i=1;i<=n;i++){
cin>>a[i];
}
for(i=1;i<=m:;i++){
for(j=0;j<=n;j++){
cin>>a;
if(a==a[i]){
b[j]++;
}
else{
b[a[i]]++;
}
}
}
for(j=0;j<=n;j++){
cout<<b[j]<<endl;
}
r... | a.cc: In function 'int main()':
a.cc:8:13: error: conflicting declaration 'int a [(m + 1)]'
8 | int a[m+1],b[n+1];
| ^
a.cc:5:21: note: previous declaration as 'int a'
5 | int n,m,i,j,a;
| ^
a.cc:10:23: error: invalid types 'int[int]' for array subscri... |
s006140783 | p00532 | C++ | //2015
#include<iostream>
using namespace std;
int main(void){
int n,m,i,j,a;
cin>>n;
cin>>m;
int a[m+1],b[n+1];
for(i=1;i<=m;i++){
cin>>a[i];
}
for(i=1;i<=m:;i++){
for(j=0;j<=n;j++){
cin>>a;
if(a==a[i]){
b[j]++;
}
else{
b[a[i]]++;
}
}
}
for(j=0;j<=n;j++){
cout<<b[j]<<endl;
}
r... | a.cc: In function 'int main()':
a.cc:8:13: error: conflicting declaration 'int a [(m + 1)]'
8 | int a[m+1],b[n+1];
| ^
a.cc:5:21: note: previous declaration as 'int a'
5 | int n,m,i,j,a;
| ^
a.cc:10:23: error: invalid types 'int[int]' for array subscri... |
s169808589 | p00532 | C++ | //2015
#include<iostream>
using namespace std;
int main(void){
int n,m,i,j,c;
cin>>n;
cin>>m;
int a[m+1],b[n+1];
for(i=1;i<=m;i++){
cin>>a[i];
}
for(i=1;i<=m:;i++){
for(j=1;j<=n;j++){
cin>>c;
if(c==a[i]){
b[j]++;
}
else{
b[a[i]]++;
}
}
}
for(j=0;j<=n;j++){
cout<<b[j]<<endl;
}
r... | a.cc: In function 'int main()':
a.cc:12:17: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
12 | for(i=1;i<=m:;i++){
| ^
a.cc:12:21: error: expected ';' before ':' token
12 | for(i=1;i<=m:;i++){
|... |
s730955030 | p00532 | C++ | #include <iostream>
using namespace std;
int main(){
int n,m;
int a[101],b[101],p[101];
cin >> n >> m;
for(int i=1;i<=m;i++){
cin >> a[i];
}
for(int i=1;i<=m;i++){
for(int j=1;j<=n;j++){
cin >> b[i][j];
}
}
for(int i=1;i<=m;i++){
for(int j=1;j<=n;j++){
if(a[i] == b[i][j]){
p[j]+=1;
}
else{ p[a[j]]+=1;}
}}
for(int j=1;j... | a.cc: In function 'int main()':
a.cc:12:12: error: invalid types 'int[int]' for array subscript
12 | cin >> b[i][j];
| ^
a.cc:17:16: error: invalid types 'int[int]' for array subscript
17 | if(a[i] == b[i][j]){
| ^
|
s933953087 | p00532 | C++ | N = int(input())
M = int(input())
A = list(map(int, input().split()))
p = [0] * N
for i in range(M):
for bi, b in enumerate(map(int, input().split())):
if b == A[i]:
p[bi] += 1
else:
p[A[i] - 1] += 1
print('\n'.join(map(str, p))) | a.cc:1:1: error: 'N' does not name a type
1 | N = int(input())
| ^
|
s887128053 | p00532 | C++ | #include <cstdio>
using namespace std;
int main()
{
int n, m;
int tgt[100];
int pt[100] = {0};
int nomi[100][100];
scanf("%d", &n);
scanf("%d", &m);
for (int i = 0; i < m; i++){
scanf("%d", &tgt[i]);
}
for (int i = 0; i < m; i++){
int tmp = 0;
for (int j ... | a.cc: In function 'int main()':
a.cc:25:29: error: expected ';' before ')' token
25 | i, tgt[i], i, j, nomi[i][j]);
| ^
| ;
|
s419774087 | p00532 | C++ | #include<iostream>
using namespace std;int n[100],x,k[100],m,c,i,j,l,o[100];
main(){cin>>m>>c;for(i=0;i<c;i++){cin>>k[i];}
for(i=0;i<m;i++){x=0;for(j=0;j<m;j++){o[j]=0;cin>>l;if(l!=m[i]){x++;}else{o[j]=1;x++;}}
for(j=0;j<m;j++){if(o[j]==1){n[j]+=x+1;}}}
for(i=0;i<m;i++){cout<<n[i]<<endl;}} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){cin>>m>>c;for(i=0;i<c;i++){cin>>k[i];}
| ^~~~
a.cc: In function 'int main()':
a.cc:4:60: error: invalid types 'int[int]' for array subscript
4 | for(i=0;i<m;i++){x=0;for(j=0;j<m;j++){o[j]=0;cin>>l;if(l!=m[i]){... |
s041074672 | p00532 | C++ | #include<iostream>
using namespace std;int n[100],x,k[100],m,c,i,j,l,o[100];
main(){cin>>m>>c;for(i=0;i<c;i++){cin>>k[i];}
for(i=0;i<m;i++){x=0;for(j=0;j<m;j++){o[j]=0;cin>>l;if(l!=m[i]){x++;}
else{o[j]=1;x++;}}
for(j=0;j<m;j++){if(o[j]==1){n[j]+=x+1;}}}
for(i=0;i<m;i++){cout<<n[i]<<endl;}} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){cin>>m>>c;for(i=0;i<c;i++){cin>>k[i];}
| ^~~~
a.cc: In function 'int main()':
a.cc:4:60: error: invalid types 'int[int]' for array subscript
4 | for(i=0;i<m;i++){x=0;for(j=0;j<m;j++){o[j]=0;cin>>l;if(l!=m[i]){... |
s704821776 | p00532 | C++ | #include<iostream>
using namespace std;int n[100],x,k[100],m,c,i,j,l,;
int main(){cin>>m>>c;for(i=0;i<c;i++){cin>>k[i];}
for(i=0;i<m;i++){
x=0;
for(j=0;j<m;j++){
cin>>l;
if(l!=k[i]){x++;}
else{n[j]++;}
}
n[k[i]]+=x;cout<<x<<endl;
}
for(i=0;i<m;i++){cout<<n[i]<<endl;}} | a.cc:2:51: error: expected unqualified-id before ';' token
2 | using namespace std;int n[100],x,k[100],m,c,i,j,l,;
| ^
|
s723194537 | p00532 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int player,round,i,j,k,forecast;
cin>>player>>round;
int target[round],forecast[player],sum[player];
for(i=0;i<round;i++) cin>>target[i]:
for(i=0;i<round;i++){
for(k=0;k<player;k++) cin>>forecaset[k];
for(j=0;j<player;j++){
if(forecast[j]==target[i])sum[j]++;
... | a.cc: In function 'int main()':
a.cc:7:19: error: conflicting declaration 'int forecast [player]'
7 | int target[round],forecast[player],sum[player];
| ^~~~~~~~
a.cc:5:24: note: previous declaration as 'int forecast'
5 | int player,round,i,j,k,forecast;
| ^~~... |
s187659026 | p00532 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int player,round,i,j,k,forecast;
cin>>player>>round;
int target[round],forecast[player],sum[player];
for(i=0;i<round;i++) cin>>target[i];
for(i=0;i<round;i++){
for(k=0;k<player;k++) cin>>forecaset[k];
for(j=0;j<player;j++){
if(forecast[j]==target[i])sum[j]++;
... | a.cc: In function 'int main()':
a.cc:7:19: error: conflicting declaration 'int forecast [player]'
7 | int target[round],forecast[player],sum[player];
| ^~~~~~~~
a.cc:5:24: note: previous declaration as 'int forecast'
5 | int player,round,i,j,k,forecast;
| ^~~... |
s278159104 | p00532 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int player,round,i,j,k,forecast;
cin>>player>>round;
int target[round],forecast[player],sum[player];
for(i=0;i<round;i++) cin>>target[i];
for(i=0;i<round;i++){
for(k=0;k<player;k++) cin>>forecaset[k];
for(j=0;j<player;j++){
if(forecast[j]==target[i])sum[j]++;
... | a.cc: In function 'int main()':
a.cc:7:19: error: conflicting declaration 'int forecast [player]'
7 | int target[round],forecast[player],sum[player];
| ^~~~~~~~
a.cc:5:24: note: previous declaration as 'int forecast'
5 | int player,round,i,j,k,forecast;
| ^~~... |
s658131173 | p00532 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int player,round,i,j,k;
cin>>player>>round;
int target[round],forecast[player],sum[player];
for(i=0;i<round;i++) cin>>target[i];
for(i=0;i<round;i++){
for(k=0;k<player;k++) cin>>forecaset[k];
for(j=0;j<player;j++){
if(forecast[j]==target[i])sum[j]++;
}
}
for(... | a.cc: In function 'int main()':
a.cc:11:28: error: 'forecaset' was not declared in this scope; did you mean 'forecast'?
11 | for(k=0;k<player;k++) cin>>forecaset[k];
| ^~~~~~~~~
| forecast
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.