submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s299256757 | p00485 | C++ | #include<iostream>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<vector>
using namespace std;
vector<int>x[4000];
long long n,m,a,b,c,k,G;
long long s[4000],d[4000];
long long X[4000];
double maxn;int res;
int main(){
memset(X,63,sizeof(X));
cin>>n>>m>>k;
for(int i=1;i<=m;i++){
cin>>a>>b>>c;
x... | a.cc: In function 'int main()':
a.cc:31:35: error: no matching function for call to 'max(int, long long int)'
31 | else{G=max(20,(n+k)/k+10);}
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/... |
s441354104 | p00485 | C++ |
#include <stdio.h>
#include <queue>
#include <vector>
#include <functional>
using namespace std;
using P = pair<int, int>;
struct edge { int to, cost; };
const int MAX_N = 3000;
int dist[MAX_N + 1];
vector<edge>graph[MAX_N + 1];
int n, m, k;
void dijkstra()
{
for (int i = 0; i <= n; ++i)dist[i] = 123456789;
di... | a.cc: In function 'int main()':
a.cc:67:45: error: 'round' was not declared in this scope
67 | ans = max(ans, (int)round((b - a + cost) / 2.0) + a);
| ^~~~~
|
s519714003 | p00485 | C++ | #include<iostream>
#include<cstdio>
#include<queue>
#include<functional>
#include<vector>
#include<algorithm>
#define int long long
#define P pair<int,int>//cost to
using namespace std;
int kiriage(int a) {
if (a&1)return a / 2 + 1;
return a / 2;
}
vector<P>rinsetu[3000];
int mincost[3000];
signed main() {
int a, b... | a.cc: In function 'int main()':
a.cc:19:36: error: 'LLONG_MAX' was not declared in this scope
19 | fill(mincost, mincost + a, LLONG_MAX/3);
| ^~~~~~~~~
a.cc:7:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>... |
s881071289 | p00485 | C++ | #include<bits/stdc++,h>
#define int long long
#define P pair<int,int>//cost to
using namespace std;
int kiriage(int a) {
if (a&1)return a / 2 + 1;
return a / 2;
}
vector<P>rinsetu[3000];
int mincost[3000];
signed main() {
int a, b, c; cin >> a >> b >> c;
fill(mincost, mincost + a, LLONG_MAX/3);
for (int d = 0; d ... | a.cc:1:9: fatal error: bits/stdc++,h: No such file or directory
1 | #include<bits/stdc++,h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s194621193 | p00485 | C++ | 10 30 3
2 5 831
1 7 478
10 9 435
4 7 841
10 4 399
6 8 85
9 8 433
3 7 109
9 4 325
2 4 323
5 10 410
8 2 979
3 6 818
1 10 566
9 2 781
5 4 634
8 1 248
2 1 234
4 8 497
10 3 324
8 7 137
6 7 565
1 6 357
3 1 870
2 6 36
2 3 821
3 9 884
8 10 345
3 5 901
3 4 427
2
1
5 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10 30 3
| ^~
|
s846701629 | p00485 | C++ | #include <vector>
#include <queue>
#include <algorithm>
template <size_t N, typename COST_T, COST_T INF>
class Dijkstra
{
public:
struct Path
{
int connectingIndex;
COST_T cost;
};
struct Agent
{
int index;
COST_T cost;
bool operator<(const Agent& rhs) const
{
return cost > rhs.cost;
}
};
Dij... | a.cc: In instantiation of 'void Dijkstra<N, COST_T, INF>::find_shortest_path(std::vector<int>) [with long unsigned int N = 3001; COST_T = int; COST_T INF = 1000000000]':
a.cc:120:29: required from here
120 | dijkstra.find_shortest_path(start_indices);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~... |
s631770061 | p00485 | C++ | #include<bits/stdc++.h>
using namespace std;
#define M 100000007
typedef pair<int,int> P;
/*int main(){
cout<<8979879<<endl;
}*/
int ri[3001][3001];
int main(void){
int n,m,k,
i,j,
mx,t,
a[100001],b[100001],l[100001],s[3000],
d[3001];
priority_queue<P,vector<P>,greater<P> > que;
cin>>n>>m>>k;
for(i=0;... | a.cc: In function 'int main()':
a.cc:59:23: error: invalid operands of types 'double' and 'double' to binary 'operator%'
59 | if(sum%cnt>=cnt/2) mx=max(mx,sum%cnt+1);
| ~~~^~~~
| | |
| | double
| d... |
s811091002 | p00485 | C++ | #include<bits/stdc++.h>
using namespace std;
#define M 100000007
typedef pair<int,int> P;
/*int main(){
cout<<8979879<<endl;
}*/
int ri[3001][3001];
int main(void){
int n,m,k,
i,j,
mx,t,ans,
a[100001],b[100001],l[100001],s[3000],
d[3001];
priority_queue<P,vector<P>,greater<P> > que;
cin>>n>>m>>k;
for(... | a.cc: In function 'int main()':
a.cc:66:17: error: 'x' was not declared in this scope
66 | x=(double)mx/2;
| ^
a.cc:68:17: error: 'y' was not declared in this scope
68 | y=round(x);
| ^
a.cc: At global scope:
a.cc:72:9: error: 'cout' does... |
s867871091 | p00485 | C++ | #include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int i,j;
int n,m,l;;
scanf("%d%d%d",&n,&m,&l);
vector<pair<int,int> > a[3000];
for(i=0;i<m;++i){
int p,q,r;
scanf("%d%d%d",&p,&q,&r);
--p;
--q;
a[p].push_back(make_pair(q,r));
a[q].... | a.cc: In function 'int main()':
a.cc:21:9: error: 'memset' was not declared in this scope
21 | memset(b,0x7f,sizeof(b));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include<cstdio>
+++ |+#include <cstring... |
s272455284 | p00485 | C++ | #include <cstdio>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
int main()
{
const int inf = (int)1e9;
int n, m, k;
int ans = inf;
vector<int> dist;
vector<vector<pair<int, int> > > graph;
vector<pair<pair<int, int>, int> > edge;
scanf("%d%d%d", &n, &m, &k);
dist.resize(n, inf);
for(int ... | a.cc: In function 'int main()':
a.cc:30:3: error: 'class std::priority_queue<std::pair<int, int> >' has no member named 'push_back'
30 | q.push_back(make_pair(0, s));
| ^~~~~~~~~
|
s620810049 | p00485 | C++ | #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#defin... | a.cc:24:20: error: wrong number of template arguments (1, should be 2)
24 | pair<pair<int,int> > ii[100005];
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/bits/specfun.h:43,
from /usr/include/c++/14/cmath:3906... |
s876713530 | p00485 | C++ | #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#defin... | a.cc: In function 'int main()':
a.cc:65:27: error: invalid conversion from 'int' to 'int (*)()' [-fpermissive]
65 | dijkstra(t-1);
| ~^~
| |
| int
a.cc:19:11: note: initializing argument 1 of 'void dijkst... |
s918600127 | p00485 | C++ | #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#defin... | a.cc: In function 'void dijkstra(int)':
a.cc:19:15: error: no matching function for call to 'size()'
19 | #define s size()
| ~~~~^~
a.cc:29:11: note: in expansion of macro 's'
29 | d[s]=0;
| ^
In file included from /usr/include/c++/14/string:53,
from a.cc:5... |
s479004118 | p00485 | C++ | #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#defin... | a.cc: In function 'void dijkstra(int)':
a.cc:19:15: error: no matching function for call to 'size()'
19 | #define s size()
| ~~~~^~
a.cc:29:11: note: in expansion of macro 's'
29 | d[s]=0;
| ^
In file included from /usr/include/c++/14/string:53,
from a.cc:5... |
s331771768 | p00485 | C++ | #include "stdio.h"
#include "stdlib.h"
#include <iostream>
#include <algorithm>
using namespace std;
int mati[3000];
int matis[3000];
int miti[100000][2];
int miti2[3000][3000];
int matiw[3000];
int main()
{
int n,m,k;
{
scanf("%d %d %d",&n,&m,&k);
}
{
for(int i = 0; i < 3000; i++)
{
for(int ii = 0; i... | a.cc: In function 'int main()':
a.cc:46:35: error: 'INT_MAX' was not declared in this scope
46 | mati[i] = INT_MAX;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #in... |
s951161391 | p00485 | C++ | #include <iostream>
#include <map>
#include <algorithm>
#include <deque>
using namespace std;
int main() {
int N,M,K;
vector<pair<int,int> >nGo[3001];
deque<int> dis;
int dist[3001];
int road[3000][3];
for(int i=1;i<=3000;i++)
dist[i]=(1 << 30 );
cin >> N >> M >> K;
int a,b,c;
for(int i=0;i<M;i++){
cin >>... | a.cc: In function 'int main()':
a.cc:9:9: error: 'vector' was not declared in this scope
9 | vector<pair<int,int> >nGo[3001];
| ^~~~~~
a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
4 | #include <deque>
+++ |+#include... |
s695092446 | p00485 | C++ | #include <iostream>
#include <map>
#include <algorithm>
#include <deque>
#include <vector>
using namespace std;
int main() {
int N,M,K;#include <iostream>
#include <map>
#include <algorithm>
#include <deque>
#include <vector>
using namespace std;
int main() {
int N,M,K;
vector<pair<int,int> >nGo[3001];
deque<int>... | a.cc:9:19: error: stray '#' in program
9 | int N,M,K;#include <iostream>
| ^
a.cc: In function 'int main()':
a.cc:9:20: error: 'include' was not declared in this scope
9 | int N,M,K;#include <iostream>
| ^~~~~~~
a.cc:9:37: error: expected primary-... |
s333334637 | p00486 | C | #include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
typedef __int64 ll;
int max;
ll dist(int x1, int y1, int x2, int y2)
{
if (abs(x2 - x1) + abs(y2 - y1) > max){
max = abs(x2 - x1) + abs(y2 - y1);
}
return (2 * (abs(x2 - x1) + abs(y2 - y1)));
}
int comp(const void *a, co... | main.c:6:9: error: unknown type name '__int64'; did you mean '__int64_t'?
6 | typedef __int64 ll;
| ^~~~~~~
| __int64_t
|
s036285163 | p00486 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
using namespace std;
long long h, w, n, x[1000000], y[1000000], ex[1000000], ey[1000000], sum, d[1000000], bx, by;
long long sx[1000000], sy[1000000], sumx, sumy, mn, dx = 1145141145141919810LL, dy = 1145141145141919810LL, cx, cy, minx = 114514114... | a.cc: In function 'int main()':
a.cc:46:32: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
46 | for (int i = 0; i < my.size; i++) {
... |
s712964195 | p00486 | C++ | #include <vector>
#include <iostream>
#include <algorithm>
#pragma warning(disable : 4996)
using namespace std;
int H, W, N, A, B;
long long LX, LY, RX, RY; // rotate
vector<int> X;
vector<int> Y;
vector<int> EX; // sorted X
vector<int> EY; // sorted Y
vector<int> UX; // unique X
vector<int> UY; // unique Y
vecto... | a.cc: In function 'int main()':
a.cc:31:32: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'std::vector<long long int>')
31 | X = vector<long long>(N);
| ^
In file included from /usr/include/c++/14/vector:72,
from a.cc:1:
/usr/i... |
s008655453 | p00486 | C++ | #include<bits/stdc++.h>
#define int long long
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
using namespace std;
static const int INF = 1ll<<60;
typedef pair<int,int> pii;
struct P{
int x;
int y;
p(){};
P(int p1,int p2){
x=p1;
y=p2;
}
};
int W,H;
int... | a.cc:14:5: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive]
14 | p(){};
| ^
a.cc: In member function 'int P::p()':
a.cc:14:9: warning: no return statement in function returning non-void [-Wreturn-type]
14 | p(){};
| ^
|
s848169609 | p00486 | C++ | #include<bits/stdc++.h>
#define int long long
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
using namespace std;
static const int INF = 1ll<<60;
typedef pair<int,int> pii;
struct P{
int x;
int y;
p(){};
P(int p1,int p2){
x=p1;
y=p2;
}
};
int W,H;
int... | a.cc:14:5: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive]
14 | p(){};
| ^
a.cc: In member function 'int P::p()':
a.cc:14:9: warning: no return statement in function returning non-void [-Wreturn-type]
14 | p(){};
| ^
|
s971680365 | p00486 | C++ | #include<bits/stdc++.h>
#define int long long
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
using namespace std;
static const int INF = 1ll<<60;
typedef pair<int,int> pii;
struct P{
int x;
int y;
p(){}
P(int p1,int p2){
x=p1;
y=p2;
}
};
int W,H;
int ... | a.cc:14:5: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive]
14 | p(){}
| ^
a.cc: In member function 'int P::p()':
a.cc:14:9: warning: no return statement in function returning non-void [-Wreturn-type]
14 | p(){}
| ^
|
s541861986 | p00486 | C++ |
using namespace std;
#define int long long
#define fst first
#define scd second
#define PB push_back
#define MP make_pair
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define omajinai ios::sync_with_stdio(false);cin.tie(0)
#define rep(i,x) for(int i=0;i<(int)(x);++i)
#define rep1(i,x) for(int... | a.cc:18:9: error: 'vector' does not name a type
18 | typedef vector<int> vi;
| ^~~~~~
a.cc:19:9: error: 'vector' does not name a type
19 | typedef vector<vi> vvi;
| ^~~~~~
a.cc:20:9: error: 'pair' does not name a type
20 | typedef pair<int, int> pii;
| ^~~~
a.cc:21:9: ... |
s250180929 | p00486 | C++ | #include<cstdio>
#include<cstdlib>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;
typedef long long ll;
const ll INF = 1000000000000000;
int main(){
int w,h,n;
scanf("%d%d%d",&w,&h,&n);
int x[n],y[n],sx[n],sy[n];
for(int i=0;i<n;i++){
scanf("%d%d",x+i,y+i);
sx[i] = x[i], sy[... | a.cc: In function 'int main()':
a.cc:24:7: error: conflicting declaration 'int x'
24 | int x,y;
| ^
a.cc:14:7: note: previous declaration as 'int x [n]'
14 | int x[n],y[n],sx[n],sy[n];
| ^
a.cc:24:9: error: conflicting declaration 'int y'
24 | int x,y;
| ^
a.cc:14:12... |
s045653583 | p00486 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<functional>
#include<string.h>
#include<vector>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<list>
#include<queue>
#include<deque>
#include<string>
#include<stack>
#define int long long
#define P pair<int,int>
using... | a.cc:22:11: error: 'LLONG_MAX' was not declared in this scope
22 | int dis = LLONG_MAX;
| ^~~~~~~~~
a.cc:16:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
15 | #include<stack>
+++ |+#include <climits>
16 | #define int long long
a... |
s590544861 | p00486 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<functional>
#include<string.h>
#include<vector>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<list>
#include<queue>
#include<deque>
#include<string>
#include<stack>
#define int long long
#define P pair<int,int>
using... | a.cc:22:11: error: 'LLONG_MAX' was not declared in this scope
22 | int dis = LLONG_MAX;
| ^~~~~~~~~
a.cc:16:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
15 | #include<stack>
+++ |+#include <climits>
16 | #define int long long
a... |
s570633314 | p00486 | C++ | #include <cstdio>
#include<cmath>
#include<algorithm>
#include<vector>
#include<queue>
#define MAX_H 1000000000 //10^9
#define MAX_W 1000000000 //10^9
#define MAX_N 100000 //10^5
#define mp make_pair
#define INF 1001001001
#define LLINF 1001001001001001001
#define llint long long int
#define ppp pair<int, pair<int,int>... | a.cc:38:5: error: extended character is not valid in an identifier
38 | llint Center1=(llint)(N/2)-1;
| ^
a.cc:39:5: error: extended character is not valid in an identifier
39 | llint Center2=(llint)(N/2);
| ^
a.cc: In function 'int main()':
a.cc:38:5: error: 'llint\U00003000Center... |
s239809272 | p00486 | C++ | è³ÅACµ½ÌÉAOJ¾ÆWAÉÈÁÄßµ¢
#include<iostream>
#include<cstdlib>
#include<queue>
#include<cstdio>
#include<vector>
#include<cassert>
#include<cstdlib>
#include<algorithm>
#include<ctime>
#include<map>
#include<climits>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n) REP(i,0,n... | a.cc:1:1: error: extended character is not valid in an identifier
1 | è³ÅACµ½ÌÉAOJ¾ÆWAÉÈÁÄßµ¢
| ^
a.cc:1:1: error: extended character is not valid in an identifier
a.cc:1:1: error: extended character is not valid in an identifier
a.cc:1:1: error: extended character is not valid in an i... |
s474074539 | p00486 | C++ | #include<iostream>
#include<algorithm>
#include<cassert>
#include<map>
#include<vector>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int D=1;
const ll inf = 1LL<<60;
inline ll myabs(ll a,ll b... | a.cc: In function 'void bf(std::vector<std::pair<long long int, long long int> >&, ll, ll, ll)':
a.cc:98:30: error: too many arguments to function 'long long int llabs(long long int)'
98 | dist.push_back(llabs(in[k].second,x[j])+llabs(in[k].first,y[i]));
| ~~~~~^~~~~~~~~~~~~~~~... |
s370649583 | p00486 | C++ | #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef pair<long long,P> P1;
typedef ... | a.cc:27:2: error: stray '#' in program
27 |     return a.first<b.first;
| ^
a.cc:27:8: error: stray '#' in program
27 |     return a.first<b.first;
| ^
a.cc:27:14: error: stray '#' in program
27 |     return a.first<b.first;
... |
s744466155 | p00486 | C++ | #include <stdio.h>
#include <iostream>
#include <algorithm>
using namespace std;
typedef struct
{
long long int w[100];
}big;
big tasu(big a,big b)
{
long long int w;
big q;
long long int mae = 0;
for(int i = 0; i < 100; i++)
{
w = a.w[i] + b.w[i] + mae;
mae = w / 1000000;
w = w % 1000... | a.cc:55:22: error: 'WWW' was not declared in this scope
55 | long long int wkyori(WWW a,WWW b)
| ^~~
a.cc:55:28: error: 'WWW' was not declared in this scope
55 | long long int wkyori(WWW a,WWW b)
| ^~~
a.cc:55:33: error: expression list treated as compou... |
s843684933 | p00487 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:37: error: cannot find symbol
for(int i=0;i<n;i++){
^
symbol: variable n
location: class Main
Main.java:42: error: cannot find symbol
for(int i=0;i<m;i++) tot+=buff[n-1-i];
^
symbol: variable n
location: class Main
2 errors
|
s393965984 | p00487 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:18: error: ';' expected
int[][] bs=new int[n][]
^
1 error
|
s826236429 | p00487 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:52: error: cannot find symbol
if(cnt!=m) continue;
^
symbol: variable cnt
location: class Main
1 error
|
s445526135 | p00487 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;
import java.math.BigInteger;
public cla... | Main.java:37: error: '(' or '[' expected
PriorityQueue<Integer> pque=new PriorityQueue>();
^
Main.java:37: error: -> expected
PriorityQueue<Integer> pque=new PriorityQueue>();
^
2 errors
|
s320269072 | p00487 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;
import java.math.BigInteger;
public cla... | Main.java:29: error: method ok in class Main cannot be applied to given types;
if(ok(mid)) lb=mid;
^
required: int,int[][]
found: int
reason: actual and formal argument lists differ in length
Main.java:40: error: cannot find symbol
pque.offer(-fs[i][0]);
^
symbol: variable fs
locat... |
s720337452 | p00487 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;
import java.math.BigInteger;
public cla... | Main.java:41: error: cannot find symbol
pque.offer(-fs[i][0]);
^
symbol: variable fs
location: class Main
Main.java:42: error: cannot find symbol
tot+=(long)fs[i][0];
^
symbol: variable fs
location: class Main
Main.java:44: error: cannot find symbol
if(tot<=(long)fs[m-1][1]*(... |
s248130756 | p00487 | Java |
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
public class Main {
int INF = 1 << 28;
Bag[] bags;
int n;
boolean ok(int x) {
long sum = 0;
PriorityQueue<Bag> que = new PriorityQueue<P0564.Bag>(1, new Comp());
for(int i=0;i<x-1;i++) que.add(bags[i]);
for(... | Main.java:16: error: package P0564 does not exist
PriorityQueue<Bag> que = new PriorityQueue<P0564.Bag>(1, new Comp());
^
1 error
|
s836737638 | p00487 | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
typedef __int64 ll;
typedef struct {
ll a, b;
} BUG;
BUG foo[300000];
int n;
int seg[1 << 19][2];
int seg_size;
ll _max(ll a, ll b)
{
return (a > b ? a : b);
}
void init(int n)
{
seg_size = 1;
while (n > seg_size){
seg_size *= ... | main.c:5:9: error: unknown type name '__int64'; did you mean '__int64_t'?
5 | typedef __int64 ll;
| ^~~~~~~
| __int64_t
|
s423123452 | p00487 | C++ | #include<bits/stdc++.h>
using namespace std;
#define reps(i,j,n) for(int i = (j) ; i < (int)(n) ; ++i)
#define rep(i,n) reps(i,0,n)
#define each(it,c) for(__typeof (c).begin() it = (c).begin(); it != (c).end(); it++)
typedef pair< int , int > Pi;
typedef pair< int , Pi > Pii;
typedef long long int64;
co... | a.cc: In function 'int calc(int)':
a.cc:23:17: error: expected primary-expression before '(' token
23 | que.push( Pi( data[i].second, data[i].first));
| ^
a.cc:23:19: error: reference to 'data' is ambiguous
23 | que.push( Pi( data[i].second, data[i].first));
| ... |
s843993362 | p00487 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <cstdio>
#include <set>
#include <queue>
#include <map>
#include <iomanip>
#include <cstring>
#include <cmath>
using namespace std;
const long double eps = 1e-12;
typedef long long ll;
typedef pair<int , int> pt;
#define sz(a) ((int) a.size() )
#def... | a.cc: In function 'void Process()':
a.cc:49:30: error: 's' was not declared in this scope
49 | sum -= qu.top();s
| ^
|
s023001001 | p00487 | C++ | #include <iostream>
#include <algorithm>
#include <set>
#include <numeric>
#include <iterator>
using namespace std;
typedef pair<int, int> P;
int N;
P A[300000];
multiset<int> os;
bool f(long long X) {
multiset<long long> s(os);
multiset<int> g;
long long t = 0;
for (int i=0; i<X-1; i++) {
int x = A[i].se... | a.cc: In function 'bool f(long long int)':
a.cc:14:27: error: no matching function for call to 'std::multiset<long long int>::multiset(std::multiset<int>&)'
14 | multiset<long long> s(os);
| ^
In file included from /usr/include/c++/14/set:64,
from a.cc:3:
/usr/inclu... |
s694403846 | p00487 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
using namespace std;
#define int long long
struct segtree {
vector<int> dat;
int n;
segtree(int n_) {
n = 1;
while (n < n_) n *= 2;
dat.resize(2*n, 0);
}
void update(int i, i... | cc1plus: error: '::main' must return 'int'
|
s118725771 | p00487 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
using namespace std;
#define int long long
struct segtree {
vector<int> dat;
int n;
segtree(int n_) {
n = 1;
while (n < n_) n *= 2;
dat.resize(2*n, 0);
}
void update(int i, i... | cc1plus: error: '::main' must return 'int'
|
s187876949 | p00487 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#define int long long
using namespace std;
typedef pair<int,int> P;
int bit[100001][2],n;
vector<P> bug;
int sum(int i,int num){
int s = 0;
while(i > 0){
s += bit[i][num];
i -= i & -i;
}
return s;
}
void add(int i,int x,int num){
while(i <= 100000)... | cc1plus: error: '::main' must return 'int'
|
s696113650 | p00487 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#define int long long
using namespace std;
typedef pair<int,int> P;
int bit[100001][2],n;
vector<P> bug;
signed sum(int i,int num){
int s = 0;
while(i > 0){
s += bit[i][num];
i -= i & -i;
}
return s;
}
void add(int i,int x,int num){
while(i <= 1000... | cc1plus: error: '::main' must return 'int'
|
s664569156 | p00487 | C++ | #include<bits/stdc++.h>
typedef p pair<int,int>
#define x first
#define y second
using namespace std;
p a[300010],c;
priority_queue<p,vector<p>,greater<p> >Q;
int main(){int n,r=0;cin>>n;for(int i=0;i<n;i++)cin>>a[i].x>>a[i].y;sort(a,a+n);long long s=0;for(int i=0;i<n;i++){s+=a[i].x,c.x=a[i].y,c.y=a[i].x;Q.push(c);whil... | a.cc:2:9: error: 'p' does not name a type
2 | typedef p pair<int,int>
| ^
a.cc:6:1: error: 'p' does not name a type
6 | p a[300010],c;
| ^
a.cc:7:1: error: 'priority_queue' does not name a type
7 | priority_queue<p,vector<p>,greater<p> >Q;
| ^~~~~~~~~~~~~~
a.cc: In function 'int ma... |
s182095556 | p00487 | C++ | #include<bits/stdc++.h>
typedef pair<int,int> p;
#define x first
#define y second
using namespace std;
p a[300010],c;
priority_queue<p,vector<p>,greater<p> >Q;
int main(){int n,r=0;cin>>n;for(int i=0;i<n;i++)cin>>a[i].x>>a[i].y;sort(a,a+n);long long s=0;for(int i=0;i<n;i++){s+=a[i].x,c.x=a[i].y,c.y=a[i].x;Q.push(c);whi... | a.cc:2:9: error: 'pair' does not name a type
2 | typedef pair<int,int> p;
| ^~~~
a.cc:6:1: error: 'p' does not name a type
6 | p a[300010],c;
| ^
a.cc:7:16: error: 'p' was not declared in this scope
7 | priority_queue<p,vector<p>,greater<p> >Q;
| ^
a.cc:7:25: error: ... |
s619671944 | p00487 | C++ | #include<iostream>
#include<algorithm>
#include<queue>
typedef pair<int,int> p;
#define x first
#define y second
using namespace std;
p a[300010],c;
priority_queue<p,vector<p>,greater<p> >q;
int main(){int n,r=0,i;cin>>n;for(i=0;i<n;i++)scanf("%d%d",&a[i].x,&a[i].y);sort(a,a+n);long long s=0;for(i=0;i<n;i++){s+=a[i].x,... | a.cc:4:9: error: 'pair' does not name a type
4 | typedef pair<int,int> p;
| ^~~~
a.cc:8:1: error: 'p' does not name a type
8 | p a[300010],c;
| ^
a.cc:9:16: error: 'p' was not declared in this scope
9 | priority_queue<p,vector<p>,greater<p> >q;
| ^
a.cc:9:25: error: ... |
s099996431 | p00487 | C++ | #include<iostream>
#include<algorithm>
#include<queue>
typedef long long int ll;
typedef pair<ll,ll> p;
#define x first
#define y second
using namespace std;
p a[300010],c;
priority_queue<p,vector<p>,greater<p> >q;
int main(){int n,r=0,i;cin>>n;for(i=0;i<n;i++)scanf("%d%d",&a[i].x,&a[i].y);sort(a,a+n);long long s=0;for... | a.cc:5:9: error: 'pair' does not name a type
5 | typedef pair<ll,ll> p;
| ^~~~
a.cc:9:1: error: 'p' does not name a type
9 | p a[300010],c;
| ^
a.cc:10:16: error: 'p' was not declared in this scope
10 | priority_queue<p,vector<p>,greater<p> >q;
| ^
a.cc:10:25: error: ... |
s645517950 | p00487 | C++ | #include<iostream>
#include<algorithm>
#include<queue>
typedef long long int ll;
typedef pair<ll,ll> p;
#define x first
#define y second
using namespace std;
p a[300010],c;
int main(){priority_queue<p,vector<p>,greater<p> >q;int n,r=0,i;cin>>n;for(i=0;i<n;i++)scanf("%d%d",&a[i].x,&a[i].y);sort(a,a+n);long long s=0;for(... | a.cc:5:9: error: 'pair' does not name a type
5 | typedef pair<ll,ll> p;
| ^~~~
a.cc:9:1: error: 'p' does not name a type
9 | p a[300010],c;
| ^
a.cc: In function 'int main()':
a.cc:10:27: error: 'p' was not declared in this scope
10 | int main(){priority_queue<p,vector<p>,greater<p> >q;in... |
s490917633 | p00487 | C++ | #include <bits/stdc++.h>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back((a))
#define all(x) (x).begin(),(x).end()
#define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x))
#define fi first
#define se... | a.cc: In function 'int main()':
a.cc:48:24: error: 'k' was not declared in this scope
48 | if(f((r+l)/2)) l = k;
| ^
a.cc:49:14: error: 'k' was not declared in this scope
49 | else r = k;
| ^
|
s157682849 | p00487 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> Bug;
#define a second
#define b first
vector<Bug> bug;
int solve(int l,int r){
if(l+1==r)return l;
int k=(l+r)/2;
ll sumA=0;
priority_queue<int> pq;
for(auto x:bug){
sumA+=x.a;
pq.push(x.a);
if(pq.size()>k){
sumA-=p... | a.cc: In function 'int main()':
a.cc:5:11: error: 'second' was not declared in this scope
5 | #define a second
| ^~~~~~
a.cc:33:14: note: in expansion of macro 'a'
33 | sort(a.begin(),a.end(),greater<Bug>());
| ^
|
s361036416 | p00487 | C++ | #include<algorithm>
#include<queue>
#include<map>
#include<utility>
using namespace std;
typedef long long ll;
pair<int,int> a[333333];
int n;
bool check(int k){
priority_queue <int> q;
ll s=0;
int i;
for(i=0;i<k;i++){
q.push(a[i].first);
s+=a[i].first;
}
//cout << s << " : " << a[k-1].second*k <<... | a.cc:32:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
32 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:33:3: error: 'cin' was not declared in this scope
33 | cin >> n;
| ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixa... |
s307091280 | p00487 | C++ | //Bokan ga bokka--nn!!
//Daily Lunch Special Tanoshii !!
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typede... | a.cc: In function 'bool comp(const A&, const A&)':
a.cc:34:13: error: expected unqualified-id before '.' token
34 | if(A.b!=B.b) return A.b>B.b;
| ^
a.cc:34:30: error: expected primary-expression before '.' token
34 | if(A.b!=B.b) return A.b>B.b;
| ... |
s690040172 | p00487 | C++ | //Bokan ga bokka--nn!!
//Daily Lunch Special Tanoshii !!
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typede... | a.cc: In function 'int main()':
a.cc:98:24: error: no matching function for call to 'max(int&, ll)'
98 | ret=max(ret,sum2(lb));
| ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/specfun.h:43,
from /usr/include/c++/14/cmath:3906,
... |
s718253763 | p00487 | C++ | #include "stdio.h"
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
#define DEEP 19
long long int gfb[(1 << DEEP)];
long long int mkb[(1 << DEEP)];
void adb(long long int* a,int b,long long int x)
{
int n = b + 1;
while(n)
{
a[n - 1] += x;
n -= (n & (-n));
}
}
long long i... | a.cc: In function 'int main()':
a.cc:55:36: error: expected primary-expression before ')' token
55 | sort(bw,bw + n,greater<int>);
| ^
|
s837470636 | p00487 | C++ | #include "stdio.h"
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
#define DEEP 19
long long int gfb[(1 << DEEP)];
long long int mkb[(1 << DEEP)];
void adb(long long int* a,int b,long long int x)
{
int n = b + 1;
while(n)
{
a[n - 1] += x;
n -= (n & (-n));
}
}
long long i... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/string:51,
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... |
s453283682 | p00487 | C++ | #include "stdio.h"
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
#define DEEP 19
long long int gfb[(1 << DEEP)];
long long int mkb[(1 << DEEP)];
void adb(long long int* a,int b,long long int x)
{
int n = b + 1;
while(n)
{
a[n - 1] += x;
n -= (n & (-n));
}
}
long long i... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/string:51,
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... |
s361276162 | p00488 | Java | package java_kadai_1;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] a = new int[3];
int[] b = new int[2];
for(int i;i<3;i++){
a[i] = sc.nextInt();
}
for(int i;i<2;i++){
b[i] = sc.nextInt();
}
int c=2000,d = 2000... | Main.java:10: error: variable i might not have been initialized
for(int i;i<3;i++){
^
Main.java:13: error: variable i might not have been initialized
for(int i;i<2;i++){
^
2 errors
|
s621047284 | p00488 | Java |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] a = new int[3];
int[] b = new int[2];
for(int i;i<3;i++){
a[i] = sc.nextInt();
}
for(int i;i<2;i++){
b[i] = sc.nextInt();
}
int c=2000,d = 2000;
for(int i=0; i<3;i... | Main.java:9: error: variable i might not have been initialized
for(int i;i<3;i++){
^
Main.java:12: error: variable i might not have been initialized
for(int i;i<2;i++){
^
2 errors
|
s974572230 | p00488 | Java | import java.util.Scanner;
public class main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int [] pasta = new int[3];
int [] drink = new int[2];
int [][] price = new int[3][2];
for(int i = 0;i < 3;i++){
pasta[i] = sc.nextInt();
}
for(int j = 0;j < 2;j++){
drink[j] = ... | Main.java:2: error: class main is public, should be declared in a file named main.java
public class main{
^
1 error
|
s466903109 | p00488 | Java | Main class{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int pasta[]=new int[3];
int juice[] = new int [2];
for(int i=0;i<3;i++)pasta[i]=in.nextInt();
for(int i=0;i<2;i++)juice[i]=in.nextInt();
int p=0,j=0;
for(int i=1;i<3;i++){
if(pasta[i]<pasta[p])p=i;
}
for(int ... | Main.java:1: error: class, interface, enum, or record expected
Main class{
^
Main.java:1: error: <identifier> expected
Main class{
^
2 errors
|
s975871981 | p00488 | Java | class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int pasta[]=new int[3];
int juice[] = new int [2];
for(int i=0;i<3;i++)pasta[i]=in.nextInt();
for(int i=0;i<2;i++)juice[i]=in.nextInt();
int p=0,j=0;
for(int i=1;i<3;i++){
if(pasta[i]<pasta[p])p=i;
}
for(int... | Main.java:3: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s960715076 | p00488 | Java | import java.util.*;
public class main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int m[] = new int[5];
int minP = 2001,minJ = 2001;
for(int i=0; i<5; i++){
m[i] =s.nextInt();
}
for(int i=0; i<5; i++){
if(i < 3){
if(m[i] < minP) minP = m[i];
}
e... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s867956760 | p00488 | Java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int[] pasta = new int[3];
int[] juice = new int[2];
for(int i=0;i<3;i++){
pasta[i] = sc.nextInt();
... | Main.java:22: error: cannot find symbol
best juice = juice[i];
^
symbol: class best
location: class Main
Main.java:22: error: variable juice is already defined in method main(String[])
best juice = juice[i];
... |
s269322995 | p00488 | Java | package SD;
import java.util.Scanner;
public class aoj0565 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int a,b,c,d,e;
a=sc.nextInt();
b=sc.nextInt();
c=sc.nextInt();
d=sc.nextInt();
e=sc.nextInt();
int[] ... | Main.java:3: error: class aoj0565 is public, should be declared in a file named aoj0565.java
public class aoj0565 {
^
1 error
|
s516408674 | p00488 | Java | package zyugyo;
import java.util.Scanner;
public class aoj0565 {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int a=0,b=0,c;
for(int i = 0;i < 3;i++){
c=in.nextInt();
if(i == 0) a = c;
else{
if(a > c){
a = c;
}
}
}
for(int i = 0;i < 2;i++){
c=in.n... | Main.java:5: error: class aoj0565 is public, should be declared in a file named aoj0565.java
public class aoj0565 {
^
1 error
|
s809619170 | p00488 | Java | package zyugyo;
import java.util.Scanner;
public class main {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int a=0,b=0,c;
for(int i = 0;i < 3;i++){
c=in.nextInt();
if(i == 0) a = c;
else{
if(a > c){
a = c;
}
}
}
for(int i = 0;i < 2;i++){
c=in.next... | Main.java:5: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s619916601 | p00488 | Java | import java.util.Scanner;
public class AOJ0565 {
public static void main(String[] args) {
int[] pasta = {0,0,0};
int[] juice = {0,0};
Scanner sc = new Scanner(System.in);
for(int i = 0; i < 3; i++){
pasta[i] = sc.nextInt();
}
for(int i = 0; i < 2; i++){
juice[i] = sc.nextInt();
}
int min = past... | Main.java:3: error: class AOJ0565 is public, should be declared in a file named AOJ0565.java
public class AOJ0565 {
^
1 error
|
s714057992 | p00488 | Java | public class AOJ0565 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int pasta=2000, juice=2000;
int i;
for(i=0;i<5;i++){
if(i<3){
pasta = Math.min(pasta, sc.nextInt());
}
else{
juice = Math.min(juice, sc.nextInt());
}
}
System.out.println(pasta+juice-50... | Main.java:1: error: class AOJ0565 is public, should be declared in a file named AOJ0565.java
public class AOJ0565 {
^
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class AOJ0565
Main.java:4: error: cannot find symbol
Scanner sc = new Sca... |
s991316081 | p00488 | Java | package software_design;
import java.util.Scanner;
public class AOJ0565 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int pasta=2000, juice=2000;
int i;
for(i=0;i<5;i++){
if(i<3){
pasta = Math.min(pasta, sc.nextInt());
}
else{
juice = Math.min(juice, sc.nextI... | Main.java:3: error: class AOJ0565 is public, should be declared in a file named AOJ0565.java
public class AOJ0565 {
^
1 error
|
s483078583 | p00488 | Java | import java.util.Scanner;
public class AOJ0565 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int pasta=2000, juice=2000;
int i;
for(i=0;i<5;i++){
if(i<3){
pasta = Math.min(pasta, sc.nextInt());
}
else{
juice = Math.min(juice, sc.nextInt());
}
}
System.... | Main.java:2: error: class AOJ0565 is public, should be declared in a file named AOJ0565.java
public class AOJ0565 {
^
1 error
|
s346460266 | p00488 | Java | public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int pasta=2000, juice=2000;
int i;
for(i=0;i<5;i++){
if(i<3){
pasta = Math.min(pasta, sc.nextInt());
}
else{
juice = Math.min(juice, sc.nextInt());
}
}
System.out.println(pasta+juice-50);
} | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
1 error
|
s524744037 | p00488 | Java | import java.util.Scanner;
public class AOJ0565 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int pasta=2000, juice=2000;
int i;
for(i=0;i<5;i++){
if(i<3){
pasta = Math.min(pasta, sc.nextInt());
}
else{
juice = Math.min(juice, sc.nextInt());
}
}
System.... | Main.java:2: error: class AOJ0565 is public, should be declared in a file named AOJ0565.java
public class AOJ0565 {
^
1 error
|
s278277366 | p00488 | Java | import java.util.Scanner;
public class Lunch {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
//1でパスタの最安値、2でジュースの最安値を記録
int min1 = 2000, min2 =2000;
for(int i=0; i<5; i++){
if(i<3){
min1 = Math.min(min1, sc.nextInt());
}
else{
min2 = Math.min(min2, sc.nextInt... | Main.java:3: error: class Lunch is public, should be declared in a file named Lunch.java
public class Lunch {
^
1 error
|
s317571210 | p00488 | Java | import java.util.Scanner;
//Lunch
public class AOJ0565 {
void run(){
Scanner sc = new Scanner(System.in);
System.out.println((Math.min(sc.nextInt(), Math.min(sc.nextInt(), sc.nextInt())))+Math.min(sc.nextInt(), sc.nextInt())-50);
}
public static void main(String[] args) {
new AOJ0565().run();
}
} | Main.java:4: error: class AOJ0565 is public, should be declared in a file named AOJ0565.java
public class AOJ0565 {
^
1 error
|
s120223043 | p00488 | Java | package software_design;
import java.util.Arrays;
import java.util.Scanner;
public class AOJ0565 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] pasta = new int [3];
int[] juice = new int [2];
pasta[0] = sc.nextInt();
pasta[1] = sc.nextInt();
pasta[2] = sc.nextInt();
... | Main.java:4: error: class AOJ0565 is public, should be declared in a file named AOJ0565.java
public class AOJ0565 {
^
1 error
|
s684598074 | p00488 | Java | import java.util.Arrays;
import java.util.Scanner;
public class AOJ0565 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] pasta = new int [3];
int[] juice = new int [2];
pasta[0] = sc.nextInt();
pasta[1] = sc.nextInt();
pasta[2] = sc.nextInt();
juice[0] = sc.nex... | Main.java:3: error: class AOJ0565 is public, should be declared in a file named AOJ0565.java
public class AOJ0565 {
^
1 error
|
s320688627 | p00488 | C | #include<stdio.h>
int main(void)
{
int ne[6];
int ans[2];
int i;
for(i=0;i<5;i++){
scanf("%d",&ne[i]);
}
if(ne[0]<ne[1] && ne[0]<ne[2])
ans[0]=ne[0];
else if(ne[1]<ne[0] && ne[1]<ne[2])
ans[0]=ne[1];
else
ans[0]=ne[2];
if(ne[3]<ne[4])
ans[1]=ne[3];
else
ans[1]=ne[4];
printf("%d\n",ans[0]+... | main.c:31:1: error: expected identifier or '(' before '}' token
31 | }
| ^
|
s842320646 | p00488 | C | #include <stdio.h>
main(){
int a,b,c,d,e,f,g,h;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
if(a<=b&&a<=c)
int f=a;
else if(b<=c)
int f=b;
else
int f=c;
if(d<=e)
int g=d;
else
int g=e;
int h=f+g-50;
printf("%d\n", h);
| main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:11:1: error: expected expression before 'int'
11 | int f=a;
| ^~~
main.c:13:1: error: expected expression before 'int'
13 | int f=b;
| ^~~
main.c:15:1: error: expected expr... |
s776737381 | p00488 | C | #include <stdio.h>
main(){
int a,b,c,d,e,f,g,h;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
if(a<=b&&a<=c)
int f=a;
else if(b<=c)
int f=b;
else
int f=c;
if(d<=e)
int g=d;
else
int g=e;
int h=f+g-50;
printf("%d\n", h);
}
| main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:11:1: error: expected expression before 'int'
11 | int f=a;
| ^~~
main.c:13:1: error: expected expression before 'int'
13 | int f=b;
| ^~~
main.c:15:1: error: expected expr... |
s281523319 | p00488 | C | #include <stdio.h>
main(){
int a,b,c,d,e;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
if((a<=b)&&(a<=c))
int f=a;
else if(b<=c)
int f=b;
else
int f=c;
if(d<=e)
int g=d;
else
int g=e;
int h=f+g-50;
printf("%d\n", h);
}
| main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:11:1: error: expected expression before 'int'
11 | int f=a;
| ^~~
main.c:13:1: error: expected expression before 'int'
13 | int f=b;
| ^~~
main.c:15:1: error: expected expr... |
s392225285 | p00488 | C | #include <stdio.h>
main(){
int a,b,c,d,e;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
if((a<=b)&&(a<=c))
int f=a;
else if(b<=c)
int f=b;
else if
int f=c;
if(d<=e)
int g=d;
else if
int g=e;
int h=f+g-50;
printf("%d\n", h);
}
| main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:11:5: error: expected expression before 'int'
11 | int f=a;
| ^~~
main.c:13:5: error: expected expression before 'int'
13 | int f=b;
| ^~~
main.c:15:5: erro... |
s553669667 | p00488 | C | #include <stdio.h>
int main(){
int a,b,c,d,e;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
if((a<=b)&&(a<=c))
int f=a;
else if(b<=c)
int f=b;
else if
int f=c;
if(d<=e)
int g=d;
else if
int g=e;
int h=f+g-50;
printf("%d\n", h);
return 0;
}
| main.c: In function 'main':
main.c:11:5: error: expected expression before 'int'
11 | int f=a;
| ^~~
main.c:13:5: error: expected expression before 'int'
13 | int f=b;
| ^~~
main.c:15:5: error: expected '(' before 'int'
15 | int f=c;
| ^~~
| (
main.c:17:5: er... |
s945111780 | p00488 | C | #include <stdio.h>
int main(){
int a,b,c,d,e;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
if((a<=b)&&(a<=c))
int f=a;
else if(b<=c)
int f=b;
else
int f=c;
if(d<=e)
int g=d;
else
int g=e;
int h=f+g-50;
printf("%d\n", h);
return 0;
}
| main.c: In function 'main':
main.c:11:5: error: expected expression before 'int'
11 | int f=a;
| ^~~
main.c:13:5: error: expected expression before 'int'
13 | int f=b;
| ^~~
main.c:15:5: error: expected expression before 'int'
15 | int f=c;
| ^~~
main.c:17:5: error: ex... |
s591165260 | p00488 | C | #include <stdio.h>
int main(){
int a,b,c,d,e;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &c);
scanf("%d", &d);
scanf("%d", &e);
if((a<=b)&&(a<=c))
int f=a;
else if(b<=c)
int f=b;
else
int f=c;
if(d<=e)
int g=d;
else
int g=e;
int h=f+g-50;
printf("%d\n", h);
return 0;
}
| main.c: In function 'main':
main.c:11:5: error: expected expression before 'int'
11 | int f=a;
| ^~~
main.c:13:5: error: expected expression before 'int'
13 | int f=b;
| ^~~
main.c:15:5: error: expected expression before 'int'
15 | int f=c;
| ^~~
main.c:17:5: error: ex... |
s737011113 | p00488 | C | #include <stdio.h>
int main(void)
{
int pasta, juice;
int mini[2] = {3000, 3000};
int i;
for (i = 0; i < 3; i++){
scanf("%d", &pasta);
if (mini[0] > pasta) mini[0] = pasta;
}
for (i = 0; i < 2; i++){
scanf("%d", &juice);
if (mini[1] > juice) mini[1] = juice;... | main.c:21:1: error: stray '\22' in program
21 | <U+0012>
| ^~~~~~~~
|
s916481551 | p00488 | C | #include<stdio.h>
int main(void){
int a,a1,b,b1,i;
for(i=0;i<3,i++){
scanf("%d",&a);
if(i!=0){
if(a1<a){
a=a1;
}
}
a1=a;
}
for(i=0;i<2,i++){
scanf("%d",&b);
if(i!=0){
if(b1<b){
b=b1;
}
}
b1=b;
}
printf("%d\n",a1+b1-50);
return 0;
} | main.c: In function 'main':
main.c:4:16: error: expected ';' before ')' token
4 | for(i=0;i<3,i++){
| ^
| ;
main.c:13:16: error: expected ';' before ')' token
13 | for(i=0;i<2,i++){
| ^
| ;
|
s119756283 | p00488 | C | #include <stdio.h>
int a,b=2000,c;
int main(void){
for(;c<3;++c)scanf("%d",&a),b=(a<b)?a:b;
scanf("%d%d",&a,&c),a=(a<c)a:c;
printf("%d\n",a+b-50);
return 0;
} | main.c: In function 'main':
main.c:6:36: error: expected ';' before 'a'
6 | scanf("%d%d",&a,&c),a=(a<c)a:c;
| ^
| ;
|
s426727425 | p00488 | C | a;main(b,c,d,e){scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);a=!printf("%d\n",(c<a=(a<b?a:b)?c:a)+(d<e?d:e)-50);} | 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);a=!printf("%d\n",(c<a=(a<b?a:b)?c:a)+(d<e?d:e)-50);}
| ^
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' [-... |
s260534834 | p00488 | C | #include <stdio.h>
int main(void) {
int a,b,c,d,e;
scanf("%d\n%d\n%d\n%d\n%d",&a,&b,&c,&d,&e);
if(a=<b && a=<c && d=<e){
a=a+d-50;
printf("%d\n",a);
}
if(b=<a && b=<c && d=<e){
a=b+d-50;
printf("%d\n",a);
}
if(c=<a && c=<b && d=<e){
a=c+d-50;
printf("%d\n",a);
}
if(b=<a && b=<c && e=<d){
a=b+e-50;
p... | main.c: In function 'main':
main.c:7:6: error: expected expression before '<' token
7 | if(a=<b && a=<c && d=<e){
| ^
main.c:11:6: error: expected expression before '<' token
11 | if(b=<a && b=<c && d=<e){
| ^
main.c:15:14: error: expected expression before '<' token
15 | if(c=<a... |
s433144638 | p00488 | C | #include <stdio.h>
int main(void) {
int a,b,c,d,e;
scanf("%d\n%d\n%d\n%d\n%d",&a,&b,&c,&d,&e);
if(a<=b && a<=c && d<=e){
a=a+d-50;
printf("%d\n",a);
}
if(b<=a && b<=c && d<=e){
a=b+d-50;
printf("%d\n",a);
}
if(c<=a && c<=b && d<=e){
a=c+d-50;
printf("%d\n",a);
}
if(a<=b && a<=c && e<=d){
a=a+e-50;
... | main.c: In function 'main':
main.c:31:1: error: expected declaration or statement at end of input
31 | }
| ^
|
s073901121 | p00488 | C | #include <stdio.h>
int main(void) {
int a,b,c,d,e,f,g,h;
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
if (a<=b && b<=c){
f=a;
} else if (a<=c && c<=b){
f=a;
} else if (b<=c && c<=a){
f=b;
} else if (b<=a && a<=c){
f=b;
} else if (c=<a && a<=b){
f=c;
} else if (c<=b && b<=a){
... | main.c: In function 'main':
main.c:14:22: error: expected expression before '<' token
14 | } else if (c=<a && a<=b){
| ^
|
s269158896 | p00488 | C | #include<stdio.h>
int main(void)
{
int a,b,c,d,e,f,g,h,i,j,k;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
f=a+d-50;
g=a+e-50;
h=b+d-50;
i=b+e-50;
j=c+d-50;
k=c+e-50;
if(f<g&&f<h&&f<i&&f<j&&f<k){
printf("%d\n",f);
break;
}
else if(g<f&&g<h&&g<i&&g<j&&g<k){
printf("%d\n",g);
break;
}
e... | main.c: In function 'main':
main.c:18:1: error: break statement not within loop or switch
18 | break;
| ^~~~~
main.c:22:1: error: break statement not within loop or switch
22 | break;
| ^~~~~
main.c:26:1: error: break statement not within loop or switch
26 | break;
| ^~~~~
main.c:30:1: error:... |
s232406686 | p00488 | C | #include<stdio.h>
int main(void)
{
int game,n,i,j,team[100];
int a,b,c,d,ban[100];
scanf("%d",&n);
for(i=0;i<n;i++){
team[i]=0;
ban[i]=1;
}
game=n*(n-1)/2;
for(i=0;i<game;i++){
scanf("%d %d %d %d",&a,&b,&c,&d);
if(c>d){
team[a-1]+=3;
}
else if(c==d){
team[a-1]+=1; team[b-1]+=1;
else{
team[b-1]+=3;
}
for(i=0;i<n;i++){
f... | main.c: In function 'main':
main.c:19:1: error: expected '}' before 'else'
19 | else{
| ^~~~
main.c:30:1: error: expected declaration or statement at end of input
30 | }
| ^
main.c:30:1: error: expected declaration or statement at end of input
|
s621975163 | p00488 | C | #include<stdio.h>
int main(void)
{
int game,n,i,j,team[100];
int a,b,c,d,ban[100];
scanf("%d",&n);
for(i=0;i<n;i++){
team[i]=0;
ban[i]=1;
}
game=n*(n-1)/2;
for(i=0;i<game;i++){
scanf("%d %d %d %d",&a,&b,&c,&d);
if(c>d){
team[a-1]+=3;
}
else if(c==d){
team[a-1]+1;
team[b-1]+1;
else{
team[b-1]+3;
}
for(i=0;i<n;i++){
for... | main.c: In function 'main':
main.c:20:1: error: expected '}' before 'else'
20 | else{
| ^~~~
main.c:31:1: error: expected declaration or statement at end of input
31 | }
| ^
main.c:31:1: error: expected declaration or statement at end of input
|
s486327778 | p00488 | C | #include<stdio.h>
#include<stdlib.h>
int main(){
int a[3],b[2],Ans=0,amin=0,bmin=0;
scanf("%d",&a[0]);
amin=a[0];
scanf("%d",&a[1]);
if(amin>a[1])amin=a[1];
scanf("%d",&a[2]);
if(amin>a[2])amin=a[2];
scanf("%d",&b[0]);
scanf("%d",&b[1]);
bmin=min(b[0],b[1]);
Ans=amin+bmin-50;
printf("%d\n",Ans);
return ... | main.c: In function 'main':
main.c:15:14: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
15 | bmin=min(b[0],b[1]);
| ^~~
| main
|
s211103976 | p00488 | C | #include<stdio.h>
#include<stdlib.h>
int main(){
int a[3],b[2],Ans=0,amin=0,bmin=0;
scanf("%d",&a[08]);
amin=a[0];
scanf("%d",&a[1]);
if(amin>a[1])amin=a[1];
scanf("%d",&a[2]);
if(amin>a[2])amin=a[2];
scanf("%d",&b[0]);
scanf("%d",&b[1]);
bmin=min(b[0],b[1]);
Ans=amin+bmin-50;
printf("%d\n",Ans);
return... | main.c: In function 'main':
main.c:7:23: error: invalid digit "8" in octal constant
7 | scanf("%d",&a[08]);
| ^~
main.c:15:14: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
15 | bmin=min(b[0],b[1]);
| ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.