submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s737702164 | p00471 | C++ | #include<cstdio>
int n, m, field[11][11], si, sj, num;
int dfs(int x, int y){
int ans = 0;
if(num == 0){
if(x == si || y == sj)return 1;
else return 0;
}
field[x][y] = 0;
for(int i = x + 1;i < m;i++){
if(field[i][y] == 1){
num--;
ans += dfs(i, y);
num++;
break;
}
} ... | a.cc: In function 'int main()':
a.cc:52:5: error: 'memset' was not declared in this scope
52 | memset(field, 0, sizeof(field));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<cstdio>
+++ |+#include <cstring>... |
s025236935 | p00471 | C++ | #include <iostream>
using namespace std;
int n, m, field[11][11], si, sj, num;
int dfs(int x, int y){
int ans = 0;
if(num == 0){
if(x == si || y == sj)return 1;
else return 0;
}
field[x][y] = 0;
for(int i = x + 1 ; i < m ; i++){
if(field[i][y] == 1){
num--;
ans += dfs(i, y);
... | a.cc: In function 'int main()':
a.cc:55:5: error: 'memset' was not declared in this scope
55 | memset(field, 0, sizeof(field));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstri... |
s106208421 | p00471 | C++ | //Bokann ga bokka--nn!!
#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<i... | a.cc: In function 'int dp(int, int)':
a.cc:46:44: error: 'link' was not declared in this scope; did you mean 'linkk'?
46 | ret+=dp(mask | (1<<link[i][y]),link[i][y]);
| ^~~~
| linkk
a.cc:55:44: e... |
s336012508 | p00472 | C | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
ll n, m;
cin >> n >> m;
vector<ll> pos(n);
for (int i = 1; i < n; i++) {
cin >> pos[i];
pos[i] += pos[i - 1];
}
ll res = 0, tmp = 0, ai;
while (m--) {
cin >> ai;
res += abs(pos[ai + tmp] - pos[tmp]);
tmp += ai;
}
cout <... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s132030192 | p00472 | C | #define abs(a) (a>0?a:-a)
int main(){
int n,a,b,i,dist[100000];
scanf("%d%d",&n,&m);
dist[0]=0;
for(i=1;i<=n;i++){
scanf("%d",&a);
dist[i]=dist[i-1]+a;
}
b=i=0;
while(m--){
scanf("%d",&a);
i+=abs(dist[b]-dist[b+a]);
b+=a;
i%=100000;
}
a=!printf("%d",i);
} | main.c: In function 'main':
main.c:5:2: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | scanf("%d%d",&n,&m);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #define abs(a) (a>0?a:-a)
main.c:5:2: warnin... |
s310741830 | p00472 | C | n,m,b,a=1e5,t[a],i;
int main(){
for(scanf("%d%*d",&n);i++<n;t[i]=t[i-1]+a)scanf("%d",&a);
for(;~scanf("%d",&a);b%=a){
b+=abs(t[m]-t[m+=a]);
}
n=!printf("%d\n",b);
} | main.c:1:1: warning: data definition has no type or storage class
1 | n,m,b,a=1e5,t[a],i;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
1 | n,m,b,a=1e5,t[a],i;
| ^
main.c:1:5: er... |
s691585694 | p00472 | C | #include <stdio.h>
int x[100005],w=1,n,m,a,i;
long s=0;
main(){
scanf("%d %d",&n,&m);
for(i=1;i<n;i++){
scanf("%d",&x[i]);
}
for(i=0;i<m;i++){
scanf("%d",&a);
if(a>0){
for(int j=0;j<a;j++){
s+=x[w+j];
}
}else{
for(int j=a;j<0;j++){
s+=x[w+j];
}
}
w+=a;
}
printf("%ld\n",s%100000);
return 0;
} | main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
4 | main(){
| ^~~~
|
s046510730 | p00472 | C | #include <stdio.h>
int x[100005],w=1,n,m,a,i;
long s=0;
main(){
scanf("%d %d",&n,&m);
for(i=1;i<n;i++){
scanf("%d",&x[i]);
}
for(i=0;i<m;i++){
scanf("%d",&a);
if(a>0){
for(n=0;n<a;n++){
s+=x[w+j];
}
}else{
for(n=a;n<0;n++){
s+=x[w+j];
}
}
w+=a;
}
printf("%ld\n",s%100000);
return 0;
} | main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
4 | main(){
| ^~~~
main.c: In function 'main':
main.c:13:8: error: 'j' undeclared (first use in this function)
13 | s+=x[w+j];
| ^
main.c:13:8: note: each undeclared identifier is reported only once for each function it appears ... |
s492635189 | p00472 | C | #include <stdio.h>
#define MAXN 100000
using namespace std;
int main(void){
int mm=0;
int nn=0;
scanf("%d",&nn);
scanf("%d",&mm);
int i=0;
int n[MAXN]={0};
int m[MAXN]={0};
for(i=0;i<nn-1;i++){
scanf("%d",&(n[i]));
}
for(i=0;i<mm;i++){
scanf("%d",&(m[i]));
}
int ans=0;
int im=0;
int... | main.c:3:1: error: unknown type name 'using'
3 | using namespace std;
| ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
3 | using namespace std;
| ^~~
|
s311979012 | p00472 | C++ | #include <iostream>
using namespace std;
int dist[100000];
int main(){
int n,m,i,d;
while(cin>>n>>m){
memset(dist,0,sizeof(dist));
for(i=1;i<n;i++){
cin>>d;
dist[i]=dist[i-1]+d;
}
int sum=0;
int p=0;
for(i=0;i<m;i++){
cin>>d;
sum+=(d>0)?(dist[p+d]-dist[p]):(dist[p]-dist[p+d]);
p+=d;
}
c... | a.cc: In function 'int main()':
a.cc:7:17: error: 'memset' was not declared in this scope
7 | memset(dist,0,sizeof(dist));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+... |
s888232015 | p00472 | C++ | //AOJ 0549 A Traveler
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int n, m, now, t[MAX_N], p[MAX_M], res = 0;
void solve(int plan){
if (plan > 0){
const int INF = 100000000, MAX_N = 1000000, MAX_M = 1000000;
for (int i = 0; i < plan; i++){
res += t[now + i];
}
}
else{
for... | a.cc:6:18: error: 'MAX_N' was not declared in this scope
6 | int n, m, now, t[MAX_N], p[MAX_M], res = 0;
| ^~~~~
a.cc:6:28: error: 'MAX_M' was not declared in this scope
6 | int n, m, now, t[MAX_N], p[MAX_M], res = 0;
| ^~~~~
a.cc: In function 'void solve(... |
s153942086 | p00472 | C++ | //AOJ 0549 A Traveler
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const int MAX_N=100001,MAX_M=100001
int n, m, now, t[MAX_N], p[MAX_M], res = 0;
void solve(int plan){
if (plan > 0){
const int INF = 100000000, MAX_N = 1000000, MAX_M = 1000000;
for (int i = 0; i < plan; i++){
re... | a.cc:7:1: error: expected ',' or ';' before 'int'
7 | int n, m, now, t[MAX_N], p[MAX_M], res = 0;
| ^~~
a.cc: In function 'void solve(int)':
a.cc:12:25: error: 'res' was not declared in this scope
12 | res += t[now + i];
| ^~~
a.cc:12:32: error: 't' was... |
s565589263 | p00472 | C++ | #include <bits/stdc++.h>
using namespace std;
//BITを用いる解法O(mlogn)
const int mod=100000;
int n,m;
int bitsize=1<<20;
int s[100010];
int a[100010];
int bit[bitsize];
void makebit(){
while(n>bitsize) bitsize*=2;
for(int i=1;i<n;i++){//扱いやすさの都合上0は用いない
int now=i;
while(now<=bitsize){
(bit[now]+=s[i])%=mod;
now+=... | a.cc:9:9: error: size of array 'bit' is not an integral constant-expression
9 | int bit[bitsize];
| ^~~~~~~
|
s132205396 | p00472 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
int m;
int a;
int pos;
int dis;
int ans = 0;
int x[100010];
scanf("%d %d",&n,&m);
x[0] = 0;
for(int i = 1;i < n;i++){
scanf("%d", &dis);
x[i] = x[i - 1] + dis;
}
while( m-- ){
scanf("%d",... | a.cc: In function 'int main()':
a.cc:21:19: error: expected ';' before 'if'
21 | pos += dis
| ^
| ;
22 | if(dis < 0){
| ~~
a.cc:29:20: error: 'result' was not declared in this scope
29 | printf("%d\n", result);
| ... |
s608694985 | p00472 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
int m;
int a;
int pos;
int dis;
int ans = 0;
int x[100010];
scanf("%d %d",&n,&m);
x[0] = 0;
for(int i = 1;i < n;i++){
scanf("%d", &dis);
x[i] = x[i - 1] + dis;
}
while( m-- ){
scanf("%d",... | a.cc: In function 'int main()':
a.cc:21:19: error: expected ';' before 'if'
21 | pos += dis
| ^
| ;
22 | if(dis < 0){
| ~~
a.cc:29:20: error: 'result' was not declared in this scope
29 | printf("%d\n", result);
| ... |
s507346305 | p00472 | C++ | #include<iostream>
using namespace std;
int main(){
int n;
int m;
int dis;
int l;
int pos = 0
int ans = 0;
int x[100010];
scanf("%d %d",&n,&m);
x[0] = 0;
for (int i = 1; i < n; i++){
scanf("%d", &x[i]);
x[i] += x[i - 1];
}
while (m--){
scanf("%d... | a.cc: In function 'int main()':
a.cc:10:5: error: expected ',' or ';' before 'int'
10 | int ans = 0;
| ^~~
a.cc:21:9: error: 'result' was not declared in this scope
21 | result += abs(x[pos + l] - x[pos]);
| ^~~~~~
a.cc:22:19: error: 'M' was not declared in this scope
22 | ... |
s750840719 | p00472 | C++ | #include<cstdio>
#include<math.h>
#include <stdlib.h>
#define M 100000
#include<iostream>
using namespace std;
int main(){
int n;
int m;
int dis;
int l;
int pos = 0
int ans = 0;
int x[100010];
scanf("%d %d",&n,&m);
x[0] = 0;
for (int i = 1; i < n; i++){
scanf("%d", &x... | a.cc: In function 'int main()':
a.cc:15:5: error: expected ',' or ';' before 'int'
15 | int ans = 0;
| ^~~
a.cc:26:9: error: 'result' was not declared in this scope
26 | result += abs(x[pos + l] - x[pos]);
| ^~~~~~
a.cc:30:20: error: 'result' was not declared in this scope
3... |
s713671242 | p00472 | C++ | #include <vector>
#include <iostream>
using namespace std;
int main()
{
int n, m, d, r;
scanf("%d", &n);
scanf("%d", &m);
vector<int> s(n); s[0] = 0;
vector<int> a(m + 1); a[0] = 0;
for(int i = 1; i < n; i++)
{
scanf("%d", &d);
s[i] = d + s[i - 1];
... | a.cc: In function 'int main()':
a.cc:31:16: error: 'sum' was not declared in this scope
31 | ret += sum[a[i]] - sum[a[i - 1]];
| ^~~
|
s421222453 | p00472 | C++ | #include <cstdio>
#include <algorithm>
#pragma warning(disable : 4996)
using namespace std;
#define mygc getchar_unlocked
inline void reader(int *x) {
int k, m = 0; *x = 0;
while (true) {
mygc(k);
if (k == '-') { m = 1; break; }
if (48 <= k && k <= 57) { *x = k - 48; break; }
}
while (true) {
mygc(k);
if... | a.cc: In function 'void reader(int*)':
a.cc:10:21: error: too many arguments to function 'int getchar_unlocked()'
10 | mygc(k);
| ^
In file included from /usr/include/c++/14/cstdio:42,
from a.cc:1:
/usr/include/stdio.h:590:12: note: declared here
590 | ext... |
s127784244 | p00472 | C++ | #include <iostream>
using namespace std;
int n,m,d[100005],nowwhere,imos[100005];
long long int ans=0;
int main(){
cin>>n>>m;
for(int i=1; i<n; i++) cin>>d[i];??¨ nowwhere=1;
int a;
for(int i=1; i<=m; i++){
cin>>a;
if(a>0){
imos[nowwhere]++;
nowwhere+=a;
... | a.cc: In function 'int main()':
a.cc:8:38: error: expected primary-expression before '?' token
8 | for(int i=1; i<n; i++) cin>>d[i];??¨ nowwhere=1;
| ^
a.cc:8:39: error: expected primary-expression before '?' token
8 | for(int i=1; i<n; i++) cin>>d[i];??¨ ... |
s101567570 | p00472 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int dp[100000][100000];
int field[100000];
int method[100000];
int n,m;
void dpcreate(void){
for(int lp=0;lp<n;lp++){
dp[lp][lp]=0;
}
for(int lp=1;lp<n;lp++){
dp[0][lp]=dp[0][lp-1]+field[lp-1];
dp[lp][0]=dp[0][lp];
}
for(int lp1=1;lp1<n-1;lp1++){
... | /tmp/ccGeNW8S.o: in function `dpcreate()':
a.cc:(.text+0x2d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccGeNW8S.o
a.cc:(.text+0x6c): relocation truncated to fit: R_X86_64_PC32 against symbol `field' defined in .bss section in /tmp/ccGeNW8S.o
a.cc:(.text+0xc0): reloca... |
s869464346 | p00472 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int dp[100000][100000];
int field[100000];
int method[100000];
int n,m;
void dpcreate(void){
for(int lp=0;lp<n;lp++){
dp[lp][lp]=0;
}
for(int lp=1;lp<n;lp++){
dp[0][lp]=dp[0][lp-1]+field[lp-1];
dp[lp][0]=dp[0][lp];
}
for(int lp1=1;lp1<n-1;lp1++){
... | /tmp/ccylBOhu.o: in function `dpcreate()':
a.cc:(.text+0x2d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccylBOhu.o
a.cc:(.text+0x6c): relocation truncated to fit: R_X86_64_PC32 against symbol `field' defined in .bss section in /tmp/ccylBOhu.o
a.cc:(.text+0xc0): reloca... |
s365554261 | p00472 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, init, n) for(int i = init; i < (n); i++)
using namespace std;
using ll = long long int;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using edge = struct
{
int to, cost;
};
const int MOD = 1e9 + 7;
const int iINF ... | a.cc: In function 'int main()':
a.cc:50:17: error: invalid operands of types 'int' and 'double' to binary 'operator%'
50 | cout << ans % 1e5 << endl;
| ~~~ ^ ~~~
| | |
| int double
|
s005018763 | p00472 | C++ | d | a.cc:1:1: error: 'd' does not name a type
1 | d
| ^
|
s493592453 | p00472 | C++ | #include <iostream>
#include <cmath>
using namespace std;
const int size = 100001;
int length[size];
int main( void ) {
int n, m;
cin >> n >> m;
length[0] = 0;
for ( int i = 1; i < n; i++ ) {
int si;
cin >> si;
length[i] = length[i-1] + si;
}
int k = 0;
int answer... | a.cc:6:12: error: reference to 'size' is ambiguous
6 | int length[size];
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c... |
s997649620 | p00472 | C++ | #include <iostream>
#include <cmath>
using namespace std;
const int size = 100001;
int length[size];
int main( void ) {
int n, m;
cin >> n >> m;
length[0] = 0;
for ( int i = 1; i < n; i++ ) {
int si;
cin >> si;
length[i] = length[i-1] + si;
}
int k = 0;
int answer... | a.cc:6:12: error: reference to 'size' is ambiguous
6 | int length[size];
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c... |
s941403453 | p00472 | C++ | #include <stdio.h>
#include <stdlib.h>
int main(void)
{
int n, m;
int sumLoad[100001];
int now;
int ans;
scanf("%d%d", &n, &m);
sumLoad[0] = 0;
for (int i = 0; i < n - 1; i++){
scanf("%d", &sumLoad[i + 1]);
sumLoad[i + 1] += sumLoad[i];
}
now = 0;
ans = 0;
for (int i = 0; i < m; i++){
int a;
s... | a.cc: In function 'int main()':
a.cc:25:53: error: 'sumLoa' was not declared in this scope; did you mean 'sumLoad'?
25 | ans = (ans + abs(sumLoad[now + a] - sumLoa) % 100000;
| ^~~~~~
| ... |
s177911774 | p00472 | C++ | #include <stdio.h>
#include <stdlib.h>
int main(void)
{
int n, m;
int sumLoad[100001];
int now;
int ans;
scanf("%d%d", &n, &m);
sumLoad[0] = 0;
for (int i = 0; i < n - 1; i++){
scanf("%d", &sumLoad[i + 1]);
sumLoad[i + 1] += sumLoad[i];
}
now = 0;
ans = 0;
for (int i = 0; i < m; i++){
int a;
s... | a.cc: In function 'int main()':
a.cc:25:51: error: invalid operands of types 'int' and 'int [100001]' to binary 'operator-'
25 | ans = (ans + abs(sumLoad[now + a] - sumLoad)) % 100000;
| ~~~~~~~~~~~~~~~~ ^ ~~~~~~~
| ... |
s154216272 | p00472 | C++ | #include<vector>
#include<cstdio>
#include<math>
using namespace std;
int main(void){
int n,m,s,cnt=0,w=0;
vector<int> a;
//a.push_back(0);
scanf("%d%d",&n,&m);
for(int i=1;i<n;i++){
scanf("%d",&s);
a.push_back(s);
}
for(int i=0;i<m;i++){
scanf("%d",&s);
for(int j=0;j<s;j++){
cnt+=a[w++];
}
for(in... | a.cc:3:9: fatal error: math: No such file or directory
3 | #include<math>
| ^~~~~~
compilation terminated.
|
s262466152 | p00472 | C++ | #include <cstdio>
int x[100005],w=1;
long long s=0;
int main(n,m,a,i){
scanf("%d %d",&n,&m);
for(i=1;i<n;i++){
scanf("%d",&x[i]);
}
for(i=0;i<m;i++){
scanf("%d",&a);
if(a>0){
for(int j=0;j<a;j++){
s+=x[w+j];
}
}else{
for(int j=a;j<0;j++){
s+=x[w+j];
}
}
w+=a;
}
printf("%lld\n",s%100000);
return 0;
} | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main(n,m,a,i){
| ^~~~
a.cc:4:10: error: 'n' was not declared in this scope
4 | int main(n,m,a,i){
| ^
a.cc:4:12: error: 'm' was not declared in this scope
4 | int main(n,m,a,i){
| ^
a.cc:4:14: ... |
s925330404 | p00472 | C++ | #include <cstdio>
int x[100005],w=1;
long long s=0;
main(n,m,a,i){
scanf("%d %d",&n,&m);
for(i=1;i<n;i++){
scanf("%d",&x[i]);
}
for(i=0;i<m;i++){
scanf("%d",&a);
if(a>0){
for(int j=0;j<a;j++){
s+=x[w+j];
}
}else{
for(int j=a;j<0;j++){
s+=x[w+j];
}
}
w+=a;
}
printf("%lld\n",s%100000);
return 0;
} | a.cc:4:5: error: expected constructor, destructor, or type conversion before '(' token
4 | main(n,m,a,i){
| ^
|
s859308609 | p00472 | C++ | #include <cstdio>
int x[100005],w=1;
long long s=0;
main(int n,m,a,i){
scanf("%d %d",&n,&m);
for(i=1;i<n;i++){
scanf("%d",&x[i]);
}
for(i=0;i<m;i++){
scanf("%d",&a);
if(a>0){
for(int j=0;j<a;j++){
s+=x[w+j];
}
}else{
for(int j=a;j<0;j++){
s+=x[w+j];
}
}
w+=a;
}
printf("%lld\n",s%100000);
return 0;
} | a.cc:4:12: error: 'm' has not been declared
4 | main(int n,m,a,i){
| ^
a.cc:4:14: error: 'a' has not been declared
4 | main(int n,m,a,i){
| ^
a.cc:4:16: error: 'i' has not been declared
4 | main(int n,m,a,i){
| ^
a.cc:4:1: warning: ISO C++ forbids dec... |
s747552544 | p00472 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
int m;
cin >>n;
cin >>m;
int a[n];
a[0]=0;
int b;
int c;
b=0;
while(b<n){
cin >>c;
a[b+1]=a[b]+c;
b=b+1;}
int e;
e=0;
int d;
d=0;
b=0;
while(b<m){
cin >>c;
if(c>0){e=(e+a[d+c]-a[d])%100000}
else{e=(e+a[d]-a[d+c])%100000}
d=d+c;
b=b+1;}
cout <<e<<endl;} | a.cc: In function 'int main()':
a.cc:24:33: error: expected ';' before '}' token
24 | if(c>0){e=(e+a[d+c]-a[d])%100000}
| ^
| ;
a.cc:25:30: error: expected ';' before '}' token
25 | else{e=(e+a[d]-a[d+c])%100000}
| ... |
s805480319 | p00472 | C++ | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<cstring>
#include<vector>
using namespace std;
#define AMA(100000)
int N,M;
int S[100005];
int main(){
scanf("%d %d",&N,&M);
for(int i=2;i<=N;i++){
int s;
scanf("%d",&s);
S[i]=S[i-1]+s;
}
int now = 1;
int res = 0;
... | a.cc:8:13: error: expected parameter name, found "100000"
8 | #define AMA(100000)
| ^~~~~~
a.cc: In function 'int main()':
a.cc:23:35: error: 'AMA' was not declared in this scope
23 | res += (abs(S[now+a]-S[now]))%AMA;
| ^~~
a.cc:26:21: error: 'AMA' w... |
s739325916 | p00472 | C++ | #include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cctype>
#include<complex>
#include<iostream>
#include<sstream>
#include<algorithm>
#include<functional>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<map>
using namespace std;
const int dx[] = {1,0,-1,0},dy[] =... | a.cc: In function 'int main()':
a.cc:39:26: error: 'j' was not declared in this scope
39 | if(res+field[j]>=mod)reps(j,now,now+x)res = (res+field[j])%mod;
| ^
a.cc:44:9: error: expected '}' before 'else'
44 | else{
| ^~~~
a.cc:38:18: note: to match ... |
s807771197 | p00473 | 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:21: error: illegal start of expression
for(int j=;j<m;j++){
^
1 error
|
s690684227 | p00473 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
typedef uint16_t li;
const li linf = 0xfffffffffffffff;
li dp[5005][5005][2];
short int leng[10005] = { 0 };
int main()
{
for (int i = 0; i < 5005; i++) {
for (int j = 0; j < 5005; j++) {
dp[i][j][0] = linf;
dp[i][j][1] = linf;
}
}
dp[0][0][0] =... | a.cc:4:9: error: 'uint16_t' does not name a type
4 | typedef uint16_t li;
| ^~~~~~~~
a.cc:3:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
2 | #include <algorithm>
+++ |+#include <cstdint>
3 | using namespace std;
a.cc:5:7: error... |
s191688742 | p00473 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
typedef uint16_t li;
const li linf = 1000000;
li dp[5005][5005][2];
short int leng[10005] = { 0 };
int main()
{
for (int i = 0; i < 5005; i++) {
for (int j = 0; j < 5005; j++) {
dp[i][j][0] = linf;
dp[i][j][1] = linf;
}
}
dp[0][0][0] = 0;
dp[0]... | a.cc:4:9: error: 'uint16_t' does not name a type
4 | typedef uint16_t li;
| ^~~~~~~~
a.cc:3:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
2 | #include <algorithm>
+++ |+#include <cstdint>
3 | using namespace std;
a.cc:5:7: error... |
s942805993 | p00473 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <queue>
#include <deque>
#include <complex>
#define FOR(i,a,b) for(int i=(a);i<(int)(b);i++)
#define REP(i,a) FOR(i,0,a)
#define X real()
#define Y imag()
using namespace std;
typedef long long ll;
typedef int useType;... | a.cc: In function 'int main()':
a.cc:36:31: error: 'n1' was not declared in this scope; did you mean 'n'?
36 | REP(k,n1)
| ^~
a.cc:9:42: note: in definition of macro 'FOR'
9 | #define FOR(i,a,b) for(int i=(a);i<(int)(b);i++)
| ... |
s575680771 | p00473 | C++ | //0550 Dividing Snacks お菓子の分割
#include <cstdio>
#include <algorithm>
using namespace std;
int dp[2][5010][2];
#define MAX 100000000
int main(void){
int n;
scanf("%d",&n);
int i,j;
int a[10001];
for(i=0;i<n-1;i++){
scanf("%d",&a[i]);
}
for(i=0;i<2;i++){
for(j=0;j<=5001;j++){
dp[i][j][0]=MAX;
dp[i][j]... | a.cc: In function 'int main()':
a.cc:35:25: error: invalid types 'int[int]' for array subscript
35 | if(dp[01[n/2][i]<min){
| ^
a.cc:35:37: error: expected ']' before ')' token
35 | if(dp[01[n/2][i]<min){
| ^
... |
s556963901 | p00473 | C++ | #include <cstdio>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
int n, t, dp[2][5001][2];
scanf("%d",&n);
rep(i,2)rep(j,5001)rep(k,2)dp[i][j][k]=100000000;
dp[0][1][0] = 0; dp[0][0][1] = 0;
for(int i = 1; i < n; i++){
scanf("%d",&t);
for(int j = 0; j <= n/2; j++){
... | a.cc: In function 'int main()':
a.cc:13:31: error: 'min' was not declared in this scope; did you mean 'main'?
13 | dp[1][j][0] = min(dp[0][j-1][0],dp[0][j-1][1]+t);
| ^~~
| main
a.cc:19:20: error: 'min' was not declared in this s... |
s387199748 | p00473 | C++ | #include<bits/stdc++.h>
using namespace std;N,C,D[2][5001],i,j,*A,*B;main(){A=*D;B=D[1];cin>>N;fill_n(*D,1e4+2,1e9);A[1]=*B=0;for(;++i<N&&cin>>C;)for(j=N/2;~j;)A[j+1]=min(A[j],B[j]+C),B[j--]=min(A[j]+C,B[j]);cout<<min(A[N/2],B[N/2])<<endl;} | a.cc:2:21: error: 'N' does not name a type
2 | using namespace std;N,C,D[2][5001],i,j,*A,*B;main(){A=*D;B=D[1];cin>>N;fill_n(*D,1e4+2,1e9);A[1]=*B=0;for(;++i<N&&cin>>C;)for(j=N/2;~j;)A[j+1]=min(A[j],B[j]+C),B[j--]=min(A[j]+C,B[j]);cout<<min(A[N/2],B[N/2])<<endl;}
| ^
a.cc:2:46: warning: IS... |
s016598676 | p00473 | C++ | nclude<bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
int main()
{
int N, t[10000] = {};
int dp[5001][2];
fill_n(*dp, 5001 * 2, INF);
scanf("%d", &N);
for(int i = 0; i < N - 1; i++) scanf("%d", &t[i]);
dp[1][0] = 0;
for(int i = 0; i < N - 1; i++) {
for(int j = N / 2; j > 0; j--) {
... | a.cc:1:1: error: 'nclude' does not name a type
1 | nclude<bits/stdc++.h>
| ^~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'fill_n' was not declared in this scope
8 | fill_n(*dp, 5001 * 2, INF);
| ^~~~~~
a.cc:10:3: error: 'scanf' was not declared in this scope
10 | scanf("%d", &N);
... |
s609911679 | p00473 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define INF (1<<29)
int n;
int time[10000];
int dp[10000][5000];//[i][j] = i????????\?????§j??¬??????????°?
// d????????\?????§a?????????????°????
int dfs(int d, in... | a.cc:12:15: error: 'int time [10000]' redeclared as different kind of entity
12 | int time[10000];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bit... |
s845683715 | p00473 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define INF (1<<29)
int n;
int time[10000];
int dp[10000][5000];//[i][j] = i????????\?????§j??¬??????????°?
// d????????\?????§a?????????????°????
int dfs(int d, in... | a.cc:12:15: error: 'int time [10000]' redeclared as different kind of entity
12 | int time[10000];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bit... |
s644121134 | p00473 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define int long long
using namespace std;
typedef long long ll;
int k[10000];
int dp[2][5101][2];
signed main()
{
int N, i, j;
cin >> N;
rep(i,N-1) cin >> k[i];
memset(dp, 0x7f, sizeof(dp));
dp[0][0][0] = 0;
rep(i,N) {
int m = min(5009, i);
f... | a.cc: In function 'int main()':
a.cc:19:28: error: no matching function for call to 'min(int, long long int&)'
19 | int m = min(5009, i);
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bit... |
s205021034 | p00473 | C++ | #include<bits/stdc++.h>
using namespace std;
????
int dp[2][5005][2]{};//1 here 0 there
int main(){
????????for(int x=0;x<2;x++){
????????for(int y=0;y<5000;y++){
????????????????dp[x][y][0]=dp[x][y][1]=1<<29;
????????????????}
????????}
????????dp[0][0][0]=dp[0][0][1]=0;
????????int a;
????????cin>>a;
????????for(int ... | a.cc:3:1: error: expected unqualified-id before '?' token
3 | ????
| ^
a.cc: In function 'int main()':
a.cc:6:1: error: expected primary-expression before '?' token
6 | ????????for(int x=0;x<2;x++){
| ^
a.cc:6:2: error: expected primary-expression before '?' token
6 | ????????for(int x=0;x<2;x++... |
s598329819 | p00473 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <bitset>
#include <fstream>
#include <cmath>
#include <ctime>
#include <numeric>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int... | a.cc: In function 'int main()':
a.cc:34:17: error: 'memset' was not declared in this scope
34 | memset(dp, INF, sizeof(dp));
| ^~~~~~
a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
13 | #include <numeric>
... |
s942154634 | p00473 | C++ | 在しない数の個数が許容される範囲(空白カードがあれば 1 以下、無ければは 0 以下)に収ま | a.cc:1:56: error: extended character 、 is not valid in an identifier
1 | 在しない数の個数が許容される範囲(空白カードがあれば 1 以下、無ければは 0 以下)に収ま
| ^
a.cc:1:1: error: '\U00005728\U00003057\U0000306a\U00003044\U00006570\U0000306e\U0000500b\U00006570\U0000304c\U00008a31\U00005bb9\U0... |
s393844534 | p00473 | C++ | #include<cstdio>
#include<iostream>
#define INF 10000000
using namespace std;
int dp[2][100000][2]={{{0}}};
int main(){
for(int i = 0;i < 2;i++){
for(int j = 0;j < 100000;j++){
dp[i][j][0] = dp[i][j][1] = INF;
}
}
int N;
cin>>N;
int v[100000]={0};
for(int i = 0; i <... | a.cc: In function 'int main()':
a.cc:40:2: error: expected '}' at end of input
40 | }
| ^
a.cc:7:11: note: to match this '{'
7 | int main(){
| ^
|
s680829453 | p00473 | C++ | #include<cstdio>
using namespace std;
int main(){
const int I=99999999;
int n,c,m;
int p[2][5000+2][2];
for(int i=0;i<2;i++)for(int j=0;j<5002;j++){p[i][j][0]=I; p[i][j][1]=I;}
p[1][1][0]=0;
p[1][0][1]=0;
cin>>n;
for(int i=2;i<=n;i++){
int s=i%2,t=1-s;
cin>>c;
m=min(i,n/2);
for(int j=0;j<=m;j++){
if... | a.cc: In function 'int main()':
a.cc:11:9: error: 'cin' was not declared in this scope
11 | cin>>n;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<cstdio>
+++ |+#include <iostream>
2 | using nam... |
s055089070 | p00473 | C++ | #include<iostream>
using namespace std;
int N;
int time[9999];
int main(){
int i;
cin >> N;
for(i = 0;i < N;i++){
cin >> time[i];
}
int min;
min = time[0]+time[N/2];
for(i = 1;i < N/2-1;i++){
if(min > time[i]+time[i+N/2]){
min = time[i]+time[i+N/2];
}
}
if(min > time[N/2-1])
min = time[N/2-1];
cout << min << endl;
retu... | a.cc:4:14: error: 'int time [9999]' redeclared as different kind of entity
4 | int time[9999];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gt... |
s046120733 | p00473 | C++ |
#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define MAXN 10012
#define INF 1e+9
int SwapDim1Array(int **a,int **b);
typedef struct{
int exist;
int none;
} dint;
dint origin[MAXN];
dint buffer[MAXN];
dint *dp = origin;
dint *dpbuf = buffer;
int field[MAXN] = {0};
int length = 0;
in... | a.cc: In function 'int main()':
a.cc:40:39: error: cannot convert 'dint*' to 'int**'
40 | SwapDim1Array(dp,dpbuf);
| ^~
| |
| dint*
a.cc:11:25: note: initializ... |
s379814340 | p00473 | C++ |
#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define MAXN 10012
#define INF 1e+9
int SwapDim1Array(int **a,int **b);
typedef struct{
int exist;
int none;
} dint;
dint origin[MAXN];
dint buffer[MAXN];
dint *dp = origin;
dint *dpbuf = buffer;
int field[MAXN] = {0};
int length = 0;
in... | a.cc: In function 'int main()':
a.cc:40:39: error: cannot convert 'dint*' to 'int**'
40 | SwapDim1Array(dp,dpbuf);
| ^~
| |
| dint*
a.cc:11:25: note: initializ... |
s830897743 | p00473 | C++ |
#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define MAXN 10012
#define INF 1e+9
typedef struct{
int exist;
int none;
} dint;
int SwapDim1Array(dint **a,dint **b);
dint origin[MAXN];
dint buffer[MAXN];
dint *dp = origin;
dint *dpbuf = buffer;
int field[MAXN] = {0};
int length = 0;
... | a.cc: In function 'int main()':
a.cc:9:13: error: no match for 'operator=' (operand types are 'dint' and 'double')
9 | #define INF 1e+9
| ^~~~
a.cc:38:36: note: in expansion of macro 'INF'
38 | dpbuf[j] = INF;
| ^~~
a.cc:14:3: not... |
s309946979 | p00473 | C++ |
#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define MAXN 10012
#define INF 1e+9
typedef struct{
int exist;
int none;
} dint;
int SwapDim1Array(dint **a,dint **b);
//dint origin[MAXN];
//dint buffer[MAXN];
dint *dp = origin;
dint *dpbuf = buffer;
dp = (dint *)malloc(sizeof(dint)*MAX... | a.cc:19:12: error: 'origin' was not declared in this scope
19 | dint *dp = origin;
| ^~~~~~
a.cc:20:15: error: 'buffer' was not declared in this scope; did you mean 'setbuffer'?
20 | dint *dpbuf = buffer;
| ^~~~~~
| setbuffer
a.cc:21:1: error: 'dp' does not... |
s415012017 | p00473 | C++ |
#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define MAXN 10012
#define INF 1e+9
typedef struct{
int exist;
int none;
} dint;
int SwapDim1Array(dint **a,dint **b);
//dint origin[MAXN];
//dint buffer[MAXN];
dint *dp = origin;
dint *dpbuf = buffer;
dp = (dint *)malloc(sizeof(dint)*MAX... | a.cc:19:12: error: 'origin' was not declared in this scope
19 | dint *dp = origin;
| ^~~~~~
a.cc:20:15: error: 'buffer' was not declared in this scope; did you mean 'setbuffer'?
20 | dint *dpbuf = buffer;
| ^~~~~~
| setbuffer
a.cc:21:1: error: 'dp' does not... |
s848863655 | p00473 | C++ |
#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define MAXN 10012
#define INF 1e+9
typedef struct{
int exist;
int none;
} dint;
int SwapDim1Array(dint **a,dint **b);
//dint origin[MAXN];
//dint buffer[MAXN];
dint *dp = origin;
dint *dpbuf = buffer;
dp = (dint *)malloc(sizeof(dint)*MAX... | a.cc:19:12: error: 'origin' was not declared in this scope
19 | dint *dp = origin;
| ^~~~~~
a.cc:20:15: error: 'buffer' was not declared in this scope; did you mean 'setbuffer'?
20 | dint *dpbuf = buffer;
| ^~~~~~
| setbuffer
a.cc:21:1: error: 'dp' does not... |
s539142180 | p00473 | C++ |
#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define MAXN 10012
#define INF 1e+9
typedef struct{
int exist;
int none;
}dint;
int SwapDim1Array(dint **a,dint **b);
dint origin[MAXN];
dint buffer[MAXN];
dint *dp = origin;
dint *dpbuf = buffer;
int field[MAXN] = {0};
int length = 0;
i... | a.cc: In function 'int main()':
a.cc:44:39: error: cannot convert 'dint*' to 'dint**'
44 | SwapDim1Array(dp,dpbuf);
| ^~
| |
| dint*
a.cc:15:26: note: initiali... |
s112040291 | p00474 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Queue;
/**
* Icicles
*/
public class Main {
static P0551 main = new P0551();
public static void main(String[] args) throws IOException {
Bu... | Main.java:13: error: cannot find symbol
static P0551 main = new P0551();
^
symbol: class P0551
location: class Main
Main.java:13: error: cannot find symbol
static P0551 main = new P0551();
^
symbol: class P0551
location: class Main
2 errors
|
s060785178 | p00474 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <queue>
#include <stack>
#include <set>
using namespace std;
#define ALL(co) co.begin(), co.end()
#defi... | a.cc:42:13: error: 'std::vector<int> time' redeclared as different kind of entity
42 | vector<int> time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++... |
s687617838 | p00474 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <queue>
#include <stack>
#include <set>
using namespace std;
#define ALL(co) co.begin(), co.end()
#defi... | a.cc:42:13: error: 'std::vector<int> time' redeclared as different kind of entity
42 | vector<int> time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++... |
s210730713 | p00474 | C++ | #include <stdio.h>
#include <queue>
#include <map>
#include <algorithm>
using namespace std;
typedef unsigned long ulong;
typedef pair<ulong,int> pli;
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REP(i,b) FOR(i,0,b)
#define MP(f,s) make_pair(f,s)
priority_queue<pli> p;
ulong t[100000];
int n=0;
int l=0;
ulong g=... | a.cc:19:9: error: 'ULONG_MAX' was not declared in this scope
19 | ulong g=ULONG_MAX;
| ^~~~~~~~~
a.cc:5:1: note: 'ULONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include <algorithm>
+++ |+#include <climits>
5 |
|
s620133019 | p00474 | C++ | #include<cstdio>
#include<math.h>
#include<algorithm>
#include<string.h>
#include<vector>
#include<queue>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
const int INF=1001001001;
pair<int,int> map[100002];
int time[100002];
int main(){
int N,L;
scanf("%d %d",&N,&L);
rep(i,N){
int a;
scanf(... | a.cc:26:54: warning: trigraph ??> ignored, use -trigraphs to enable [-Wtrigraphs]
26 | sort(map,map+N,greater<pair<int,int>???>());
a.cc: In function 'int main()':
a.cc:26:56: error: template argument 1 is invalid
26 | sort(map,map+N,greater<pair<int,int>???>());
| ... |
s334157813 | p00474 | C++ | #include<cstdio>
#include<math.h>
#include<algorithm>
#include<string.h>
#include<vector>
#include<queue>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
const int INF=1001001001;
pair<int,int> map[100002];
long long int time[100002];
int main(){
int N,L;
scanf("%d %d",&N,&L);
rep(i,N){
int a;... | a.cc: In function 'int main()':
a.cc:31:57: error: no matching function for call to 'max(long long int&, int&)'
31 | if(map[i].second!=0){yokomax=max(time[map[i].second+1],yokomax);}
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file includ... |
s420230085 | p00474 | C++ | //成長し続けることが目的
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <map>
#define N_MAX 100000
#define L_MAX 50000
using namespace std;
typedef int TL;
typedef int num;
typedef pair<TL,num> I;
int N,L;
int Ice[N_MAX+2+1];
int time = 0;
priority_queue<I>... | a.cc:18:5: error: 'int time' redeclared as different kind of entity
18 | int time = 0;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
... |
s875084278 | p00474 | C++ | //成長し続けることが目的
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <map>
#define N_MAX 100000
#define L_MAX 50000
using namespace std;
typedef int TL;
typedef int num;
typedef pair<TL,num> I;
int N,L;
int Ice[N_MAX+2+1];
int time = 0;
priority_queue<I>... | a.cc:18:5: error: 'int time' redeclared as different kind of entity
18 | int time = 0;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
... |
s246943576 | p00474 | C++ | //成長し続けることが目的
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <map>
#define N_MAX 100000
#define L_MAX 50000
using namespace std;
typedef int TL;
typedef int num;
typedef pair<TL,num> I;
int N,L;
int Ice[N_MAX+2+1];
int ctime = 0;
priority_queue<I... | a.cc:18:5: error: 'int ctime' redeclared as different kind of entity
18 | int ctime = 0;
| ^~~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
... |
s463603019 | p00474 | C++ | //成長し続けることが目的
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <map>
#define N_MAX 100000
#define L_MAX 50000
using namespace std;
typedef int TL;
typedef int num;
typedef pair<TL,num> I;
int N,L;
int Ice[N_MAX+2+1];
int ct = 0;
priority_queue<I> q... | a.cc: In function 'void solve()':
a.cc:32:58: warning: pointer to a function used in arithmetic [-Wpointer-arith]
32 | que.push(make_pair(-1*(L-Ice[n+1]+time),n+1));
| ~~~~~~~~~~^~~~~
a.cc:32:46: error: invalid operands of types 'int' and '... |
s622398078 | p00474 | C++ | //成長し続けることが目的
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <map>
#define N_MAX 100000
#define L_MAX 50000
using namespace std;
typedef int TL;
typedef int num;
typedef pair<TL,num> I;
int N,L;
int Ice[N_MAX+2+1];
int ct = 0;
priority_queue<I> q... | a.cc: In function 'void solve()':
a.cc:32:58: warning: pointer to a function used in arithmetic [-Wpointer-arith]
32 | que.push(make_pair(-1*(L-Ice[n+1]+time),n+1));
| ~~~~~~~~~~^~~~~
a.cc:32:46: error: invalid operands of types 'int' and '... |
s904400749 | p00474 | C++ | //成長し続けることが目的
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <map>
#define N_MAX 100000
#define L_MAX 50000
using namespace std;
typedef int TL;
typedef int num;
typedef pair<TL,num> I;
int N,L;
int Ice[N_MAX+2+1];
int ct = 0;
priority_queue<I> q... | a.cc: In function 'void solve()':
a.cc:32:58: warning: pointer to a function used in arithmetic [-Wpointer-arith]
32 | que.push(make_pair(-1*(L-Ice[n+1]+time),n+1));
| ~~~~~~~~~~^~~~~
a.cc:32:46: error: invalid operands of types 'int' and '... |
s914210041 | p00474 | C++ | #include<bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i <= (int)n; ++i)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define MP make_pair
#define PB push_back
#defi... | a.cc:23:22: error: conflicting declaration 'typedef long long unsigned int uint'
23 | typedef unsigned int uint;
| ^~~~
In file included from /usr/include/stdlib.h:514,
from /usr/include/c++/14/cstdlib:79,
from /usr/include/x86_64-linux-gnu/c++/14/bits/std... |
s251493381 | p00474 | C++ | #include<bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i <= (int)n; ++i)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define MP make_pair
#define PB push_back
#defi... | a.cc:23:22: error: conflicting declaration 'typedef long long unsigned int uint'
23 | typedef unsigned int uint;
| ^~~~
In file included from /usr/include/stdlib.h:514,
from /usr/include/c++/14/cstdlib:79,
from /usr/include/x86_64-linux-gnu/c++/14/bits/std... |
s731124011 | p00474 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int N, L, a[100000], X, time = 0, pluser = 1000000, longs[30000];
int main()
{
cin >> N >> L;
for (int i = 0; i < N; i++)
{
cin >> a[i];
}
for (int fin = 0; fin != 1;)
{
fin = 1;
pluser = 60000;
X = 0;
if (a[0] > a[1])
{
pluser = min(... | a.cc:6:25: error: 'int time' redeclared as different kind of entity
6 | int N, L, a[100000], X, time = 0, pluser = 1000000, longs[30000];
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
... |
s461488767 | p00474 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int N, L, a[100000], X, time = 0, pluser = 1000000, longs[30000];
int main()
{
cin >> N >> L;
for (int i = 0; i < N; i++)
{
cin >> a[i];
}
for (int fin = 0; fin != 1;)
{
fin = 1;
pluser = 60000;
X = 0;
if (a[0] > a[1])
{
pluser = min(... | a.cc:6:25: error: 'int time' redeclared as different kind of entity
6 | int N, L, a[100000], X, time = 0, pluser = 1000000, longs[30000];
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
... |
s150258203 | p00474 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define len(a) sizeof(a)
#define ll long long
#define pii pair<int... | a.cc: In function 'void solve()':
a.cc:24:21: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
24 | FOR(i,n) ma=max(ma,dfs(i+1));
| ^~~
| ffs
a.cc: In function 'int dfs(int)':
a.cc:30:54: error: 'l' was not declared in this scope
30 | if(a[now]... |
s482514850 | p00474 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define len(a) sizeof(a)
#define ll long long
#define pii pair<int... | a.cc: In function 'void solve()':
a.cc:23:21: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
23 | FOR(i,n) ma=max(ma,dfs(i+1));
| ^~~
| ffs
|
s188011258 | p00474 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int n, l, icicles[100001], time1, time2, loop, ans = 0;
int main(){
cin >> n >> l;
for(int i = 1; i <= n; i++){
cin >> icicles[i];
}
for(int i = 1; i <= n; i++){
if(icicles[i] > icicles[i - 1] && icicles[i] > icicles[i + 1]){
time1 = l - icicles... | a.cc: In function 'int main()':
a.cc:17:25: error: 'roop' was not declared in this scope; did you mean 'loop'?
17 | roop = i;
| ^~~~
| loop
|
s320513914 | p00474 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int n, l, icicles[100001], time1, time2, loop, ans = 0;
int main(){
cin >> n >> l;
for(int i = 1; i <= n; i++){
cin >> icicles[i];
}
for(int i = 1; i <= n; i++){
if(icicles[i] > icicles[i - 1] && icicles[i] > icicles[i + 1]){
time1 = l - icicles... | a.cc: In function 'int main()':
a.cc:18:66: error: 'roop' was not declared in this scope; did you mean 'loop'?
18 | while(icicles[loop] > icicles[--loop] && roop > 0){
| ^~~~
| ... |
s871570263 | p00474 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int n, l, icicles[100001], time1, time2, loop, ans = 0;
int main(){
cin >> n >> l;
for(int i = 1; i <= n; i++){
cin >> icicles[i];
}
for(int i = 1; i <= n; i++){
if(icicles[i] > icicles[i - 1] && icicles[i] > icicles[i + 1]){
time1 = l - icicles... | a.cc: In function 'int main()':
a.cc:23:25: error: 'roop' was not declared in this scope; did you mean 'loop'?
23 | roop = i;
| ^~~~
| loop
|
s223399187 | p00474 | C++ |
#include <bits/stdc++.h>
using namespace std;
typedef long long int;
int n,l;
int a[123456];
typedef pair<int,int> P;//first:time second:index
signed main()
{
priority_queue<P,vector<P>,greater<P> >que;
cin >> n >> l;
a[0] = a[n+1] = 0;
for(int i = 0;i < n;++i)
{
cin >> a[i + 1];
}
for(int i = 1;i <= n;++i... | a.cc:4:19: error: declaration does not declare anything [-fpermissive]
4 | typedef long long int;
| ^~~
|
s145831123 | p00474 | C++ |
#include <bits/stdc++.h>
using namespace std;
typedef long long Int;
typedef Int int;
int n,l;
int a[123456];
typedef pair<int,int> P;//first:time second:index
signed main()
{
priority_queue<P,vector<P>,greater<P> >que;
cin >> n >> l;
a[0] = a[n+1] = 0;
for(int i = 0;i < n;++i)
{
cin >> a[i + 1];
}
for(int... | a.cc:5:9: error: multiple types in one declaration
5 | typedef Int int;
| ^~~
a.cc:5:13: error: declaration does not declare anything [-fpermissive]
5 | typedef Int int;
| ^~~
|
s297536656 | p00474 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
int main(){
int n.l;
cin>>n>>l;
int icic[114514];
icic[0]=0;
icic[1]=0;
for(int i=0;i<n;i++)cin>>icic[i+2];
icic[n+2]=0;
icic[n+3]=0;
int t=0;
priority_queue<P>Q;
for(int i=1;i<=n;i++){
if(icic[i]>icic[i-1]&&icic[i]>icic[i+1]){
Q.p... | a.cc: In function 'int main()':
a.cc:6:14: error: expected initializer before '.' token
6 | int n.l;
| ^
a.cc:7:14: error: 'n' was not declared in this scope; did you mean 'yn'?
7 | cin>>n>>l;
| ^
| yn
a.cc:7:17: error: 'l' was not declare... |
s079264119 | p00474 | C++ | # include <algorithm>
# include <cassert>
# include <cctype>
# include <cstdio>
# include <cstdlib>
# include <cstring>
# include <cmath>
# include <iostream>
# include <map>
# include <queue>
# include <set>
# include <sstream>
# include <stack>
# include <string>
# include <vector>
# include <iomanip>
# define rep(... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s969278543 | p00474 | C++ | # include <algorithm>
# include <cassert>
# include <cctype>
# include <cstdio>
# include <cstdlib>
# include <cstring>
# include <cmath>
# include <iostream>
# include <map>
# include <queue>
# include <set>
# include <sstream>
# include <stack>
# include <string>
# include <vector>
# include <iomanip>
# define rep(... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s904616115 | p00474 | C++ | #include <stdio.h>
#include<iostream>
using namespace std;
#include <stack>
int main()
{
int k,n,o,r,i[100002]={ 0 },t=0,s;
stack<int> up;
scanf("%d%d",&k,&o);
r=k;
for(n=1;n<=k;n++){
scanf("%d",&i[n]);
}
for(t=1;;t++)
{
for(n=1;n<=k;n++)
{
if(i[n]>i[n-1]&&i[n]>i[n+1])
{
up.push(n);
}
}
w... | a.cc: In function 'int main()':
a.cc:40:18: error: expected '}' at end of input
40 | return 0;
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s978642549 | p00474 | C++ |
void maxi(T& x, T y){
if(x < y) x = y;
}
template<class T>
void mini(T& x, T y){
if(x > y) x = y;
}
const double EPS = 1e-10;
const double PI = acos(-1.0);
const LL MOD = 1e9+7;
int main(){
cin.tie(0);
ios_base::sync_with_stdio(false);
LL N, L;
cin >> N >> L;
vector<PLL> xs(N);
REP(i,N){
ci... | a.cc:2:6: error: variable or field 'maxi' declared void
2 | void maxi(T& x, T y){
| ^~~~
a.cc:2:11: error: 'T' was not declared in this scope
2 | void maxi(T& x, T y){
| ^
a.cc:2:14: error: 'x' was not declared in this scope
2 | void maxi(T& x, T y){
| ^
a.cc:2:... |
s041592180 | p00474 | C++ | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
using namespace std;
#define FOR... | a.cc: In function 'int main()':
a.cc:64:23: error: no matching function for call to 'max(ll&, int&)'
64 | FOR(i,0,N) ans = max(ans, t[i]);
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: n... |
s225690772 | p00474 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s728033968 | p00474 | C++ | a
| a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s448780420 | p00474 | C++ | #include <iostream>
#include <algorithm>
#include <queue>
#include <cassert>
using namespace std;
#define INF (1<<29)
int time[100002];
int data[100002];
int main(){
for(int i = 0 ; i < 100002 ; i++)
time[i] = -1;
int n,L;
cin >> n >> L;
time[0] = time[n+1] = data[n+1] = data[0] = 0 ;
priority_queue< pai... | a.cc:8:16: error: 'int time [100002]' redeclared as different kind of entity
8 | int time[100002];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/b... |
s111947290 | p00474 | C++ | #include <iostream>
#include <map>
using namespace std;
int main(){
int n,l,*ice,buf,h=0,sz;
queue<int> q;
cin >> n >> l;
ice = new int[n+2];
ice[0] = ice[n+1] = 0;
for(int i = 1; i < n+1; i++){
cin >> ice[i];
}
for(int i = 1; i < n+1; i++){
if(ice[i]){
if((ice[i] > ice[i-1]) && (ice[i] > ice[i+1]... | a.cc: In function 'int main()':
a.cc:7:9: error: 'queue' was not declared in this scope
7 | queue<int> q;
| ^~~~~
a.cc:3:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
2 | #include <map>
+++ |+#include <queue>
3 | using nam... |
s152139188 | p00474 | C++ | #include <iostream>
#include <queue>
#include <utility>
using namespace std;
int main(){
int n,l,,buf,pa,h=0,sz,ice[100002];
queue<pair<int, int> > q;
priority_queue<pair<int, int> > bufq;
cin >> n >> l;
//ice = new int[n+2];
ice[0] = ice[n+1] = 0;
for(int i = 1; i < n+1; i++){
cin >> ice[i];
}
for(in... | a.cc: In function 'int main()':
a.cc:7:17: error: expected unqualified-id before ',' token
7 | int n,l,,buf,pa,h=0,sz,ice[100002];
| ^
|
s285728062 | p00474 | C++ | #include <cstdio>
#include <utility>
#include <queue>
using namespace std;
int i,n,L,t,tr[100002],s;
int main(){
typedef pair<int,int>pii;
priority_queue<pii> qu;
pii p;
for(scanf("%d%d",&n,&L);i++<n;)scanf("%d",tr+i);
for(;--i;)
tr[i]>tr[i-1]&tr[i]>tr[i+1]?
qu.push(pii(tr[i]-L,i)),
tr[i]=L:0;
for(;!q... | a.cc: In function 'int main()':
a.cc:18:49: error: 'u' was not declared in this scope
18 | for(;!qu.empty(); n&&n!=L&u>tr[s+2])?
| ^
a.cc:18:59: error: expected primary-expression before '?' token
18 | for(;!qu.empty(); ... |
s394629381 | p00474 | C++ | #include <cstdio>
#include <utility>
#include <queue>
using namespace std;
int i,n,L,t,s;
int main(){
typedef pair<int,int>pii;
priority_queue<pii> qu;
pii p;
int tr[100002];
for(scanf("%d%d",&n,&L);i++<n;)scanf("%d",tr+i);
*t=tr[n+1]=0;
for(;--i;)
tr[i]>tr[i-1]&tr[i]>tr[i+1]?
qu.push(pii(tr[i]-L,i)),
... | a.cc: In function 'int main()':
a.cc:13:9: error: invalid type argument of unary '*' (have 'int')
13 | *t=tr[n+1]=0;
| ^~
|
s479819980 | p00474 | C++ | #include <iostream>
#include <vector>
using namespace std;
const int INF = 100000000;
int n, l;
int data[2][100000];
int val[100000];
main(){
cin >> n >> l;
for(int i=0;i<n;i++){
cin >> data[0][i];
val[i] = data[0][i];
}
int ans = 0;
int rem = n;
int now = 0;
int next = 1;
while(rem > 0){
... | a.cc:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
12 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:15:12: error: reference to 'data' is ambiguous
15 | cin >> data[0][i];
| ^~~~
In file included from /usr/include/c++/14/string:53,
... |
s178500374 | p00474 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int N,L,a[100002]={0};
int memo[100002];
int rec(int id)
{
if(~memo[id])return memo[id];
int wait=0;
if(a[id-1]>a[id])wait=max(wait,rec(id-1));
if(a[id]<a[id+1])wait=max(wait,rec(id+1));
return memo[id] = wait + L-a[id];
}
int main()
{
memset(me... | a.cc: In function 'int main()':
a.cc:19:3: error: 'memset' was not declared in this scope
19 | memset(memo,-1,sizeof(memo));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algorithm>
+++ |+#include <cstring>
... |
s864015643 | p00474 | C++ | / JOI 2009-2010 本戦3 ツララ だよー
// オンラインジャッジに後で出す
#include <iostream>
#include <cstdio>
#include <queue>
using namespace std;
typedef pair<int,int> P;
int main(void)
{
int N, L;
cin >> N >> L;
int t[100002] = {};
priority_queue<P> pque, next_pque; // first : Long second : No
for(int i = 1; i <= N; i++)
... | a.cc:1:1: error: expected unqualified-id before '/' token
1 | / JOI 2009-2010 本戦3 ツララ だよー
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
... |
s627199478 | p00474 | C++ | #include<iostream>
using namespace std;
int N,L;
int ice[100000]; //つららの長さ
int time[100000]; //伸び始め〜折れるまで
int num[100000]; //左中右とくらべて伸びる順番(0〜2)
int stime[100000]; //伸び始める時間(>=0)
int main(){
int i,j;
cin >> N >> L;
for(i = 0;i < N;i++){
cin >> ice[i];
time[i] = L-ice[i];
}
for(i = 0;i < N-1;i++){
if(ice[i] < ... | a.cc:5:16: error: 'int time [100000]' redeclared as different kind of entity
5 | int time[100000]; //伸び始め〜折れるまで
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64... |
s728648386 | p00475 | C++ | #include <stdio.h>
#include <algorithm>
#include <climits>
using namespace std;
#define FOR(i,a,b) for(int i=a;i<b;++i)
#define REP(i,b) FOR(i,0,b)
int a[100000];
int b[100000];
int amn=INT_MAX;
int amx=INT_MIN;
int bmn=INT_MAX;
int bmx=INT_MIN;
int n;
int c,d;
int or = INT_MIN;
int ou = INT_MIN;
int main(){
scanf... | a.cc:18:5: error: expected unqualified-id before 'or' token
18 | int or = INT_MIN;
| ^~
a.cc: In function 'int main()':
a.cc:33:17: error: expected primary-expression before 'or' token
33 | or = max(or,min(max(a[i]-amn,b[i]-bmn),max(amx-a[i],bmx-b[i])));
| ^~
a.cc:3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.