submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s990720168 | p03959 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <algorithm>
using namespace std;
typedef long long ll;
int a[100000];
int b[100000];
int h[100000];
int ah[100000];
int bh[100000];
const ll MOD = ll(1e9 + 7);
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;... | a.cc: In function 'int main()':
a.cc:24:9: error: 'memset' was not declared in this scope
24 | memset(ah, -1, sizeof ah);
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <algorithm>
+++ |+#include <cs... |
s992804352 | p03959 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#define ll long long
#define MOD 1000000007
using namespace std;
ll N;
vector<ll> T;
vector<ll> A;
ll to[100001]={0};
ll hi[100001]={0}
int main(){
ll inp;
ll result=0;
T.push_back(0);
A.push_back(0);//0潰し
cin >> N;
for(ll i = 0 ;i<N;i++){
... | a.cc:17:1: error: expected ',' or ';' before 'int'
17 | int main(){
| ^~~
|
s783856505 | p03959 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;
const int MOD = 1e9 + 7;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n; cin >> n;
vector<ll> t(n), a(n);
... | a.cc: In function 'int main()':
a.cc:19:34: error: expected ']' before ')' token
19 | if (n == 1 && t[0 != a[0]) {
| ^
| ]
|
s290640062 | p03959 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;
const int MOD = 1e9 + 7;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n; cin >> n;
vector<ll> t(n), a(n);
... | a.cc: In function 'int main()':
a.cc:55:37: error: no matching function for call to 'max(long long int&, int)'
55 | int mi = max(v[i].second, 1);
| ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/inc... |
s079981005 | p03959 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#define int long long
#define mod 1000000007
using namespace std;
int a[100002], b[100002];
signed main(){
int c; scanf("%lld", &c);
a[0] = 0; b[0] = LLONG_MAX / 3;
a[c + 1] = LLONG_MAX / 3; b[c + 1] = 0;
for (int d = 0; d < c; d++) {
scanf... | a.cc: In function 'int main()':
a.cc:12:26: error: 'LLONG_MAX' was not declared in this scope
12 | a[0] = 0; b[0] = LLONG_MAX / 3;
| ^~~~~~~~~
a.cc:4:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #include<... |
s407298356 | p03959 | C | #include<stdio.h>
#define M 1000000007
int N;
int flag;
void justify_T(int T[N], int jus_T[N][2])
{
jus_T[0][0] = T[0];
jus_T[0][1] = 0;
int i;
for(i=1;i<N;i++){
if(T[i]>T[i-1]){
jus_T[i][0] = T[i];
jus_T[i][1] = 0;
}else{
jus_T[i][0] = 0;
... | main.c: In function 'main':
main.c:84:1: error: expected statement before ']' token
84 | ] result = (result*combine[i])%M;
| ^
|
s551885118 | p03959 | C++ | #include <iostream>
#include <cctype>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main(){
long long n,z[n],x,c;
x=1000000007;
cin>>n;
long long t[n],a[n],h[i];
for (int i = 0; i < n; ++i)
{
cin>>t[i];
h[i]=0;
}
for (int i = 0; i < n; ++i)
{
cin>>a[i];
}
for (int i = 0; i < n; ++i)
{
if (t[i]<t[... | a.cc: In function 'int main()':
a.cc:12:23: error: 'i' was not declared in this scope
12 | long long t[n],a[n],h[i];
| ^
a.cc:16:9: error: 'h' was not declared in this scope
16 | h[i]=0;
| ^
a.cc:26:17: error: 'h' was not declared in this scope
26 | ... |
s607984287 | p03959 | C | #include<stdio.h>
#include<math.h>
int main()
{
int num, record[2][100000], i, j;
long long ans= 1;
scanf("%d", &num);
for(i= 0; i< 2; i++)
{
for(j= 0; j< num; j++)
scanf("%d", &record[i][j]);
}
if(record[0][num- 1]!= record[1][0])
{
printf("0\n");
return 0;
}
for(i= 1; i< num- 1; i++)
{
if(re... | main.c: In function 'main':
main.c:25:78: error: lvalue required as left operand of assignment
25 | (record[0][i]> record[1][i])? ans*= record[1][i]: ans*= record[0][i];
| ^~
|
s390840852 | p03959 | C | #include <stdio.h>
int MIN(int a, int b){
return a<b?a:b;
}
int main(){
int n, i, a[100010], b[100010], f[100010]={};
long long s=1, M=(le9)+7;
scanf("%d", &n);
for(i=0;i<n;i++)
scanf("%d\n%d", &a[i], &b[i]);
for(i=0;i<n;i++){
if(i&&a[i-1]>a[i])
s=0;
if(i&&b[i-1]<b[i])
s=0;
if(i==0||a[i]-a[i-1]... | main.c: In function 'main':
main.c:9:27: error: 'le9' undeclared (first use in this function)
9 | long long s=1, M=(le9)+7;
| ^~~
main.c:9:27: note: each undeclared identifier is reported only once for each function it appears in
|
s809766711 | p03959 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,a) for(int i=0;i<(int)a;i++)
#define zero(x) memset(x, 0, sizeof x)
typedef long long ll;
int main() {
int N; cin >> N;
int A[N], B[N];
rep(i, N) cin >> A[i];
rep(i, N) cin >> B[i];
int L = -inf;
int pat[N]; zero(pat);
rep(i, N) {
if(L <... | a.cc: In function 'int main()':
a.cc:14:12: error: 'inf' was not declared in this scope; did you mean 'ynf'?
14 | int L = -inf;
| ^~~
| ynf
a.cc:40:12: error: 'MOD' was not declared in this scope
40 | ans %= MOD;
| ^~~
|
s395719279 | p03959 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N; cin >> N;
int A[N], B[N];
rep(i, N) cin >> A[i];
rep(i, N) cin >> B[i];
int L = -inf;
int pat[N]; zero(pat);
rep(i, N) {
if(L < A[i]) {
pat[i] = 1;
L = A[i];
}
}
int R = -inf;
rep(i, N)... | a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
9 | rep(i, N) cin >> A[i];
| ^
a.cc:9:3: error: 'rep' was not declared in this scope
9 | rep(i, N) cin >> A[i];
| ^~~
a.cc:12:12: error: 'inf' was not declared in this scope; did you mean 'ynf'?
12 | ... |
s987769185 | p03959 | C++ | int main() {
int N; cin >> N;
ll A[N], B[N];
rep(i, N) cin >> A[i];
rep(i, N) cin >> B[i];
int L = -inf;
ll pat[N]; zero(pat);
rep(i, N) {
if(L < A[i]) {
pat[i] = 1;
L = A[i];
}
}
int R = -inf;
rep(i, N) {
if(R < B[N-1-i]) {
if(pat[N-1-i] && A[N-1-i] != B[N-1-i]) ... | a.cc: In function 'int main()':
a.cc:3:10: error: 'cin' was not declared in this scope
3 | int N; cin >> N;
| ^~~
a.cc:4:3: error: 'll' was not declared in this scope
4 | ll A[N], B[N];
| ^~
a.cc:5:7: error: 'i' was not declared in this scope
5 | rep(i, N) cin >> A[i];
| ... |
s180140306 | p03959 | C++ | #include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cassert>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
#include <time.h>
using namespace std;
typedef pair<int,int> P;
ty... | a.cc: In function 'int main()':
a.cc:61:13: error: expected primary-expression before '}' token
61 | }else if(t[i] - t[i - 1] != 0 && a[i] - a[i + 1] == 0){
| ^
a.cc: At global scope:
a.cc:70:5: error: expected unqualified-id before 'if'
70 | if(ans == 1){
| ^~
a.cc:84:... |
s299736618 | p03959 | C++ | // g++ temp.cpp
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published b... | a.cc:144:14: error: macro "rep" passed 3 arguments, but takes just 2
144 | rep(i, 0, n) cin >> T[i];
| ^
a.cc:120:9: note: macro "rep" defined here
120 | #define rep(i,n) repl(i,0,n)
| ^~~
a.cc:145:14: error: macro "rep" passed 3 arguments, but takes just 2
145 | rep(i, 0, n) ... |
s781744725 | p03959 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
using namespace std;
#define N 1000000007
int main(){
int n;
cin >> n;
vector<unsigned long long int> v1;
vector<unsigned long long int> v2;
bool f[n];
unsigned long long int res = 1;
int tmp;
bool bf = false;
unsigned long long int b ... | a.cc: In function 'int main()':
a.cc:55:32: error: redeclaration of 'long long unsigned int res'
55 | unsigned long long int res = 1;
| ^~~
a.cc:15:32: note: 'long long unsigned int res' previously declared here
15 | unsigned long long int res = 1;
| ... |
s830403245 | p03959 | C++ | /*
安部NANA先輩大好き
*/
#include<bits/stdc++.h>
#define int long long int
#define rep(a,b,c) for(int a=b;a<c;a++)
#define repm(a,b,c) for(int a=(b-1);a>=c;a--)
#define pb push_back
#define str string
#define sf(a) scanfs("%d",&a)
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v)... | a.cc: In function 'int main()':
a.cc:78:28: error: expected primary-expression before '>' token
78 | if(ma[i-1]=>yama[i-1]){
| ^
|
s306689152 | p03959 | C++ | #include <vector>
#include <stack>
#include <stdio.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <typeinfo>
#include <queue>
using namespace std;
typedef unsigned long long ll;
void ichi(){
string s;
cin >> s;
int tmp_c = 0;
int tmp_f = 0;
for(int i=0;i<s.size();i++... | a.cc: In function 'void san2()':
a.cc:166:37: error: expected ',' or ';' before ')' token
166 | ll waru = 1000000000ll + 7ll);
| ^
a.cc:196:25: error: no match for 'operator[]' (operand types are 'std::vector<int>' and 'std::vector<int>')
196 | if(t_... |
s456010231 | p03959 | C++ | #include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cassert>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
#include <time.h>
using namespace std;
typedef pair<int,int> P;
ty... | a.cc: In function 'int main()':
a.cc:82:26: error: expected primary-expression before '<' token
82 | if(t[i] =< a[i]){
| ^
|
s117386537 | p03959 | Java | #include <iostream>
#include <queue>
using namespace std;
int main()
{
int n;
cin >> n;
vector<int> left(n);
vector<int> right(n);
vector<int> m(n, -1);
int ans = 1;
for(int i=0; i<n; ++i)
cin >> left[i];
for(int i=0; i<n; ++i)
cin >> right[i];
for(int i=0; i<n; ++i){
if(i == 0 || left[i] > left[i... | Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <queue>
^
Main.java:10: error: not a statement
cin >> n;
^
Main.java:11: error: not a statement
vector<int> left(n);
^
Main.java:12: error: not a statement
vector<int> right(n);... |
s326001246 | p03959 | C++ | #include <bits/stdc++.h>
#define ll long long
#define INF INT_MAX
#define MAX_V
using namespace std;
bool tt[200000] = {false},aa[200000] = {false};
vector<bool> flag(200000,false);
int main(){
vector< pair<int,int> > m(200000);
int n;
cin >> n;
int t[200000],a[200000];
int maxt = 0;
for(... | a.cc: In function 'int main()':
a.cc:38:5: error: 'flagg' was not declared in this scope; did you mean 'flag'?
38 | flagg = true;
| ^~~~~
| flag
|
s389952041 | p03959 | C++ | #include <bits/stdc++.h>
#define ll long long
#define INF INT_MAX
#define MAX_V
using namespace std;
bool tt[200000] = {false},aa[200000] = {false};
vector<bool> flag(200000,false);
int main(){
vector< pair<int,int> > m(200000);
int n;
cin >> n;
int t[200000],a[200000];
int maxt = 0;
for(... | a.cc: In function 'int main()':
a.cc:41:5: error: 'flagg' was not declared in this scope; did you mean 'flag'?
41 | flagg = true;
| ^~~~~
| flag
|
s184467813 | p03959 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> t;
int tmpV;
int tmp = n;
while(tmp--){
cin >> tmpV;
t.push_back(tmpV);
}
tmp = n;
vector<int> a;
while(tmp--){
cin >> tmpV;
a.push_back(tmpV);
}
vector<int> res(n, 0);
if(t.back() != a[0] || t.back(... | a.cc: In function 'int main()':
a.cc:39:43: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
39 | cout << 0 << end;
| ~~~~~~~~~~^~~~~~
In file included from /usr/include/c+... |
s109620048 | p03959 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> t;
int tmpV;
int tmp = n;
while(tmp--){
cin >> tmpV;
t.push_back(tmpV);
}
tmp = n;
vector<int> a;
while(tmp--){
cin >> tmpV;
a.push_back(tmpV);
}
vector<int> res(n, 0);
if(t.back() != a[0] || t.back(... | a.cc: In function 'int main()':
a.cc:39:43: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
39 | cout << 0 << end;
| ~~~~~~~~~~^~~~~~
In file included from /usr/include/c+... |
s402891308 | p03959 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <functional>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
#include <random>
#define rep(i,s,n) for(int i = (s); (n) > i; i+... | a.cc:21:13: error: expected '>' before numeric constant
21 | #define MOD 1000000007
| ^~~~~~~~~~
a.cc:25:14: note: in expansion of macro 'MOD'
25 | template<int MOD>
| ^~~
|
s895530327 | p03959 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<stack>
#include<math.h>
#include<queue>
#include<cstdio>
#include<unordered_set>
using namespace std;
struct mou{
long long int height;
long long int range;
};
int main()
{
int n, i, j;
long long int res = 1;
cin >> n;
vector<mou> ... | a.cc: In function 'int main()':
a.cc:26:33: error: 'INT_MAX' was not declared in this scope
26 | mous[i].range = INT_MAX;
| ^~~~~~~
a.cc:10:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
9 | #inclu... |
s344729176 | p03959 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;
#define NNN 1000000007
int main()
{
long long int N;
cin >> N;
vector<long long int> T(N), A(N);
long long int MaxT = 0, MaxA =... | a.cc: In function 'int main()':
a.cc:38:35: error: expected ')' before ';' token
38 | else dp[i] = (min(A[i], dp[i]);
| ~ ^
| )
|
s373775042 | p03959 | Java | import java.util.Scanner;
public class MainClimbMountain {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[] a = new int[N];
int[] b = new int[N];
for (int i = 0; i < N; i++) {
a[i] = sc.nextInt();
}
for (int i = 0; i < N; i++) {
b[i] = sc.ne... | Main.java:3: error: class MainClimbMountain is public, should be declared in a file named MainClimbMountain.java
public class MainClimbMountain {
^
1 error
|
s753756712 | p03959 | C++ | int n;
cin >> n;
ll tm = -1, am = -1;
ll mod = 1000000007;
vector<ll> T, A;
rep(i, n) {
ll a;
cin >> a;
tm = max(a, tm);
T.push_back(a);
}
rep(i, n) {
ll a;
cin >> a;
am = max(a, am);
A.push_back(a);
}
if (tm != am) {
P(0);
}
else {
ll ans = 1;
ll mini = 1e12;
rep(i, n) {
if (i == 0 || i == n - 1) {
mi... | a.cc:2:1: error: 'cin' does not name a type
2 | cin >> n;
| ^~~
a.cc:3:1: error: 'll' does not name a type
3 | ll tm = -1, am = -1;
| ^~
a.cc:4:1: error: 'll' does not name a type
4 | ll mod = 1000000007;
| ^~
a.cc:5:1: error: 'vector' does not name a type
5 | vector<ll> T, A;
| ... |
s492305851 | p03959 | C++ | #include<iostream>
using namespace std;
void main(){
cout << 0;
} | a.cc:3:1: error: '::main' must return 'int'
3 | void main(){
| ^~~~
|
s203063735 | p03959 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t[];
t = new int[n];
int a[];
a = new int[n];
int maxt = 0;
int maxa = 0;
int mint = 0;
int mina = 0;
... | Main.java:43: error: bad operand types for binary operator '=='
if(c[i] == null){
^
first type: int
second type: <null>
1 error
|
s452705388 | p03959 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t[];
t = new int[n];
int a[];
a = new int[n];
int maxt = 0;
int maxa = 0;
int mint = 0;
int mina = 0;
... | Main.java:16: error: ';' expected
c = new int[n]
^
1 error
|
s666565571 | p03959 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
int main() {
int n_mountain;
std::cin >> n_mountain;
std::vector<long long> t_report(n_mountain), a_report(n_mountain), min_mountain(n_mountain);
std::vector<bool> changed(n_mountain, false);
changed[0] = changed[n_mountain - 1] = tr... | a.cc: In function 'int main()':
a.cc:31:51: error: expected ')' before '{' token
31 | if(t_report[n_mountain - 1] != a_report[0]{
| ~ ^
| )
a.cc:36:24: error: 'i' was not declared in this scope
36... |
s792161729 | p03959 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
int n;
cin >>n;
long long c=1;
vector<long long>mo((long long)n,0);
vector< long long > a ((long long )n,0);
vector< long long > b ((long long )n,0);
long long am=0,bm=0,ami=10000000000,bmi=1000000000;
for(int j=0;... | a.cc: In function 'int main()':
a.cc:63:22: error: expected ';' before '}' token
63 | c*=min(a[i],b[i])
| ^
| ;
64 | }
| ~
|
s018833006 | p03959 | C++ | #include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
int main(){
vector<ll> T,A;
int N;
cin >> N;
ll ans=1;
for(int i=0;i<N;i++){
ll in;
cin >> in;
T.push_back(in);
}
for(int i=0;i<N;i++){
ll in;
cin... | a.cc: In function 'int main()':
a.cc:27:20: error: expected ';' before '{' token
27 | if(A.at(0)==T.at(0){
| ^
| ;
a.cc:28:30: error: expected primary-expression before 'else'
28 | cout << "1" << endl;}else{cout << "0" << endl;}
| ... |
s915281665 | p03959 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<ll> vi;
#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<k;i++)
#define in(i,j,k) ((i)>=(j)&&(i)<=(k))
#define INF (1<<28)
#define pb push_back
#define fs first
#define sc second
cons... | a.cc: In function 'int main()':
a.cc:39:35: error: 'ams' was not declared in this scope; did you mean 'ans'?
39 | if(i&&a[i]>a[i-1])ams=0;
| ^~~
| ans
|
s179882406 | p03959 | C++ | int main()
{
cout << 0 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:3:1: error: 'cout' was not declared in this scope
3 | cout << 0 << endl;
| ^~~~
a.cc:3:14: error: 'endl' was not declared in this scope
3 | cout << 0 << endl;
| ^~~~
|
s987275814 | p03959 | C++ | #include <iostream>
using namespace std;
int N;
int T[100005], A[100005];
int main() {
int i, max = 0, maxMt = 0;
ios_base::sync_with_stdio(0);
cin >> N;
for (i = 0; i < N; i++) {
cin >> T[i];
if (T[i] > max) {
max = T[i];
maxMt = i;
}
if (T[i] < max) {
cout << 0;
return 0;
}
}
for (i = ... | a.cc: In function 'int main()':
a.cc:53:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
53 | __int64 sum = 1;
| ^~~~~~~
| __int64_t
a.cc:61:25: error: 'sum' was not declared in this scope
61 | sum *= T[i];
| ... |
s500790935 | p03959 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
final int BASE = 1000000007;
int n = sc.nextInt();
int taka[] = new int [n];
int ao[] = new int [n];
for(int i=0;i<n;i++){
taka[i... | Main.java:72: error: reached end of file while parsing
}
^
1 error
|
s710564922 | p03959 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include<map>
#include <io... | a.cc: In function 'int main()':
a.cc:65:1: error: jump to label 'failed'
65 | failed:;
| ^~~~~~
a.cc:52:55: note: from here
52 | if (a[i] > determine[i]) goto failed;
| ^~~~~~
a.cc:56:19: note: crosses initialization of ... |
s414900218 | p03959 | C++ | #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=(n)-1;i>=0;i--)
using namespace std;
#define MOD 1000000007
int main()
{
int N;
scanf("%d", &N);
vector<int> T(N), A(N);
int max = 0, max_index = 0;
REP (i, N) {
... | a.cc: In function 'int main()':
a.cc:35:21: error: expected ';' before ':' token
35 | return 0:
| ^
| ;
a.cc:35:21: error: expected primary-expression before ':' token
|
s825680834 | p03959 | C++ |
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#includ... | a.cc: In static member function 'static long long int mint<MOD>::getmod()':
a.cc:114:24: error: 'mod' was not declared in this scope; did you mean 'modf'?
114 | return mod;
| ^~~
| modf
|
s194530516 | p03959 | C++ | #include "bits/stdc++.h"
#ifndef err
#define err(...)(void)0
#endif
using namespace std;
using ll = long long;
using ull = decltype(1ull);
template<class T>int size(T&&a) { return a.size(); }
#define REP(t,a)for(make_signed<decltype(a.second)>::type t=a.first,_l##t=a.second;t<_l##t;t++)
#define RREP(t,a)for(make_signed... | a.cc: In function 'Mint<MOD> CombMod(int, int)':
a.cc:9:21: error: need 'typename' before 'std::make_signed<decltype (make_pair<int>(r).second)>::type' because 'std::make_signed<decltype (make_pair<int>(r).second)>' is a dependent scope
9 | #define REP(t,a)for(make_signed<decltype(a.second)>::type t=a.first,_l##t=a... |
s338014589 | p03959 | C++ | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<string>
#include<sstream>
#define ll __int64
using namespace std;
const ll SUB=1000000007;
int main()
{
int n;
cin>>n;
int *t=new int[n];
int *a=new int[n];
for(int i=0;i<n;i++)cin>>t[i];
for(int i=0;i<n;i++)cin>>a... | a.cc:8:12: error: '__int64' does not name a type; did you mean '__int64_t'?
8 | #define ll __int64
| ^~~~~~~
a.cc:10:7: note: in expansion of macro 'll'
10 | const ll SUB=1000000007;
| ^~
a.cc: In function 'int main()':
a.cc:8:12: error: '__int64' was not declared in this scope; did ... |
s891410877 | p03959 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin()... | a.cc: In function 'int main()':
a.cc:46:31: error: lvalue required as left operand of assignment
46 | else if(t[i]==ma&&a[i]!=ma&&b=false){
a.cc:50:48: error: expected ')' before 'a'
50 | if(t[i]==t[i-1]&&t[i]<=t[i+1]&&a[i]<=a[i-1]a[i]==a[i+1]){
| ~ ^
... |
s575515706 | p03959 | C++ | //ここからテンプレート
//#define PLASMA_NO_BOOST
#if 1
#include<iostream>
#include<list>
#include<algorithm>
#include<utility>
#include<type_traits>
#include<tuple>
#include<memory>
#include<iterator>
#include<string>
#include<functional>
#include<list>
#include<array>
#include<complex>
#include<numeric>
#include<iomanip>
#incl... | a.cc:29:9: fatal error: boost/optional.hpp: No such file or directory
29 | #include<boost/optional.hpp>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s093008296 | p03959 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin()... | a.cc: In function 'int main()':
a.cc:42:8: error: conflicting declaration 'bool t'
42 | bool t=false;
| ^
a.cc:33:26: note: previous declaration as 'std::vector<long long int> t'
33 | std::vector<long long> t(n), a(n);
| ^
a.cc:45:30: error: no match for 'operator='... |
s807099772 | p03959 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long int LL;
LL n,large=1000000007;
LL f(vector<LL>&d1,vector<LL>d2){
if(d1.back()!=d2[0])cout<<0<<endl;
LL res=1;
for(LL i=1;i<n-1;i++){
LL tmp=0;
if(d1[i]>d1[i-1])tmp=1;
else tmp=d[i];
if(d2[i]>d2[i+1]){if(tmp==1&&d2[i]!=d1[i])return 0;else tmp=1;}
else if(d1[... | a.cc: In function 'LL f(std::vector<long long int>&, std::vector<long long int>)':
a.cc:11:10: error: 'd' was not declared in this scope
11 | else tmp=d[i];
| ^
|
s886597134 | p03959 | C++ | #include<cctype>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<cmath>
#include<cassert>
#include<algorithm>
#include<numeric>
#include<vector>
#include<string>
#include<map>
#include<unordered_map>
#include<queue>
#include<tuple>
using namespace std;
typedef long long int lnt;
typedef un... | a.cc: In function 'bool sol()':
a.cc:74:25: error: no matching function for call to 'max(long int, long long int)'
74 | lnt ans = ppp(ml,max(r-l-1,0ll));
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/bits/specfun.h:43,
from /usr/include/c++/14/cmath:3906,
... |
s912628331 | p03959 | C++ | #include "bits/stdc++.h"
using namespace std;
//諸機能
#pragma region MACRO
#define putans(x) std::cerr << "[ answer ]: " ; cout << (x) << endl
#define dputans(x) std::cerr << "[ answer ]: "; cout << setprecision(27) << (double)(x) << endl
#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define RREP(i,a,n) for(int i... | a.cc: In function 'int main()':
a.cc:69:17: error: expected '}' before 'else'
69 | else putans(0);
| ^~~~
a.cc:67:21: note: to match this '{'
67 | if (n == 1) {
| ^
a.cc:70:22: error: label 'END' used but not defined
70 | g... |
s142289000 | p03959 | C++ | #ifndef __INTMOD_H__0001__
#define __INTMOD_H__0001__
template <unsigned int Modulus>
class IntMod {
typedef unsigned long long ULL;
private:
unsigned int value_m;
void Copy(const IntMod& other) { value_m = other.value_m; }
bool Modulus_is_valid() { return Modulus != 0; }
public:
IntMod() { value_m = 0; }
IntMo... | a.cc:99:10: fatal error: IntMod.h: No such file or directory
99 | #include "IntMod.h"
| ^~~~~~~~~~
compilation terminated.
|
s648191586 | p03959 | C++ | // VSCF.cpp : Defines the entry point for the console application.
//
#include <cassert>
#include <functional>
#include <cmath>
#include <list>
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <iterator>
#include <string>
#include <vector>
#include <set>
#include <deque>
#include <map>
#include <ioma... | a.cc: In function 'int main()':
a.cc:109:1: error: jump to label 'no'
109 | no:
| ^~
a.cc:85:30: note: from here
85 | goto no;
| ^~
a.cc:91:13: note: crosses initialization of 'long long int len'
91 | int len = 0;
| ^... |
s641651104 | p03959 | C++ | #include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <functional>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <deque>
#include <ctime>
using nam... | a.cc: In function 'int main()':
a.cc:57:40: error: 'i' was not declared in this scope
57 | if(M[n-1]<t[n-1] || m[n-1] > t[i]){
| ^
|
s614837879 | p03959 | C++ | #include <iostream>
using namespace std;
typedef unsigned long long ull;
#define MAX_N 100000
#define MOD 1000000007
int N;
ull T[MAX_N+2], A[MAX_N+2];
bool flagT[MAX_N] = {false}, flagA[MAX_N] = {false};
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
cin >> N;
T[0] = 0;
A[N+1] = 0;
for(int i... | a.cc: In function 'int main()':
a.cc:33:72: error: expected '}' at end of input
33 | if(!flagT[i] && !flagA[i]) ans = (ans * min(A[i], T[i])) % MOD;
| ^
a.cc:32:28: note: to match this '{'
32 | for(int i=1; i<=N; i++){
... |
s335242064 | p03959 | C++ | #include<iostream>
#define min(a,b) a<b?a:b
#define MAX 1000000007
using namespace std;
int a[100005][4];
int main(){
__int64 s=1;
int n,m=0;
int i,j,k;
cin>>n;
for(i=0;i<100005;i++){
for(j=0;j<4;j++){
a[i][j]=MAX;
}
}
for(i=0;i<n;i++){
cin>>a[i][0];
}
for(i=0;i<n;i++){
cin>>a[i][1];
}
a[0][2]=a[0... | a.cc: In function 'int main()':
a.cc:7:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
7 | __int64 s=1;
| ^~~~~~~
| __int64_t
a.cc:54:17: error: 's' was not declared in this scope
54 | s*=a[i][2];
| ^
a.cc:57:... |
s438130343 | p03960 | C++ | // O(h^3 * w)
// rozwiązanie bazowane na `prog/tar.cpp`,
// ktore za wolno liczy koszty operacji
// autor: Jakub Wasilewski
#include <bits/stdc++.h>
using namespace std;
constexpr int max_h = 300, max_w = 300, none_value = -1, inf = 1e9;
int h, w, grid[max_h + 1][max_w + 1];
int solve(const int v)
{
int dp[max_h... | a.cc: In function 'int solve(int)':
a.cc:31:33: error: 'diff' was not declared in this scope; did you mean 'dif'?
31 | cost[i][i + diff] += (grid[h - i + 1 + j][v] == grid[h - (i + dif) + j][v + 1]);
| ^~~~
| dif
|
s001246714 | p03960 | C++ | #pragma gcc optimize("Ofast")
#include "bits/stdc++.h"
using namespace std;
typedef int64_t lld;
typedef pair<int,int> pii;
typedef pair<lld,lld> pll;
typedef pair<int,pll> pip;
typedef pair<pll,int> ppi;
typedef pair<lld,pll> plp;
typedef pair<pll,lld> ppl;
typedef pair<pll,pll> ppp;
template<typename T>
using maxHea... | In file included from /usr/include/c++/14/cassert:44,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:106,
from a.cc:3:
a.cc: In function 'int main()':
a.cc:82:17: error: expected primary-expression before ')' token
82 | assert(rep[diff+h][j+1] <= );
| ... |
s157013384 | p03960 | C++ | #pragma gcc optimize("Ofast")
#include "bits/stdc++.h"
using namespace std;
typedef int64_t lld;
typedef pair<int,int> pii;
typedef pair<lld,lld> pll;
typedef pair<int,pll> pip;
typedef pair<pll,int> ppi;
typedef pair<lld,pll> plp;
typedef pair<pll,lld> ppl;
typedef pair<pll,pll> ppp;
template<typename T>
using maxHea... | a.cc: In function 'int main()':
a.cc:81:28: error: no matching function for call to 'max(lld&, long long int)'
81 | for(int j = max(diff, 0LL); j < h+min(diff, 0LL); j++){
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/inc... |
s859198636 | p03960 | C++ | #include<bits/stdc++.h>
//ios::sync_with_stdio(false);cin.tie(0);
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<pii,int> ppii;
typedef pair<int,pii> pipi;
typedef pair<ll,ll> pll;
typedef pair<pll,ll> ppll;
typedef pair<ll,pll> plpl;
typedef tuple<ll,... | a.cc: In function 'int main()':
a.cc:67:32: error: expected ';' before 'if'
67 | sum2[j][k]=sum2[j][k-1]
| ^
| ;
68 | if(s[k-1][i]==s[k-1+j][i+1])sum[j][k]++;
| ~~
|
s340419882 | p03960 | C++ | #include <bits/stdc++.h>
using namespace std;
const int inf = 1e8, Nmax = 303;
int n, m, i, j, ans;
char a[Nmax][Nmax], ch[Nmax];
int solve(char a[], char b[])
{
int i, j, cost[Nmax][Nmax], dp[Nmax][Nmax];
for(i=0; i<=n; ++i) dp[i][n+1] = dp[n+1][i] = inf, cost[i][0] = cost[0][i] = 0;
for(i=1; i<=n; +... | a.cc: In function 'int main()':
a.cc:39:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
39 | gets(ch+1);
| ^~~~
| getw
|
s818169331 | p03960 | C++ | #include<bits/stdc++.h>
using namespace std;
int ans, N, M, cst[609][309], dp[309][309];
char sir[309][309], A[309], B[309];
int solve ()
{
for (int i=0; i<=2 * N; i++)
for (int j=0; j<=N; j++)
cst[i][j] = 0;
for (int i=1; i<=N; i++)
for (int j=1; j<=N; j++)
cst[j - i ... | a.cc: In function 'int main()':
a.cc:44:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
44 | gets (sir[i] + 1);
| ^~~~
| getw
|
s758219666 | p03960 | C++ | N,M=map(int,input().split());C=[[0]*-~N for _ in range(N+1)];D=list(map(list,C));S=[input()for _ in range(N)];r=0
for t in range(M-1):
for i in range(1,N+1):
for j in range(1,N+1):C[i][j]=C[i-1][j-1]+int(S[i-1][t]==S[j-1][t+1]);D[i][j]=min(D[i-1][j],D[i][j-1])+C[i][j]
r+=D[N][N]
print(r) | a.cc:1:1: error: 'N' does not name a type
1 | N,M=map(int,input().split());C=[[0]*-~N for _ in range(N+1)];D=list(map(list,C));S=[input()for _ in range(N)];r=0
| ^
a.cc:1:30: error: 'C' does not name a type
1 | N,M=map(int,input().split());C=[[0]*-~N for _ in range(N+1)];D=list(map(list,C));S=[input()for ... |
s355010142 | p03960 | C++ | #include <cmath>
#include <vector>
#include <map>
#include <functional>
#include <queue>
#include <iostream>
#include <string>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <cstdint>
#include <climits>
#include <unordered_set>
#include <sstream>
using namespace std;
#define ll long long int
#... | a.cc: In function 'int main()':
a.cc:59:9: error: 'memset' was not declared in this scope
59 | memset(cost, 0, sizeof(cost));
| ^~~~~~
a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
13 | #include <unordered_set>
+++ |+#in... |
s953063517 | p03960 | C++ | #include <iostream>
#include <cctype>
#include <cstdio>
#include <string>
#include <typeinfo>
#include <queue>
using namespace std;
int cost(int,int,int);
int min (int,int);
int h,w;
int d[301][301];
char c[][];
int z;
int main() {
cin>>h>>w;
for (int i = 0; i < h; ++i)
{
for (int j = 0; j < w; ++j)
{
... | a.cc:15:14: error: declaration of 'c' as multidimensional array must have bounds for all dimensions except the first
15 | char c[][];
| ^
a.cc: In function 'int main()':
a.cc:25:30: error: 'c' was not declared in this scope
25 | cin>>c[i][j];
| ... |
s324070232 | p03960 | C++ | #include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define FOR(i,l,r) for(int i=(l);i<=(r);++i)
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
const int maxn=1e5+2;
const LL MOD=1e9+7;
int h,w;
char C[310][310];
LL val[310][310],dp[310][310];
LL... | a.cc: In function 'LL cl(int, int)':
a.cc:21:18: error: expected '}' at end of input
21 | }
| ^
a.cc:16:20: note: to match this '{'
16 | LL cl(int a,int b) {
| ^
a.cc:21:18: warning: no return statement in function returning non-void [-Wreturn-type]
... |
s449368564 | p03960 | C++ | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#define oo 987654321
using namespace std;
string a[330];
int h, w, ans, dt[330][330], dt2[330][330];
int c(int k, int x, int y)
{
if( x > h or y > h ) return 0;
if( x == h or y == h ) return 0;
if( ~dt2[x][y] ) return dt2[x][y];
... | a.cc: In function 'int main()':
a.cc:35:9: error: 'memset' was not declared in this scope
35 | memset(dt, -1, sizeof(dt)), memset(dt2, -1, sizeof(dt2)), ans += dp(x, 0, 0);
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>... |
s541166873 | p03960 | C++ | test | a.cc:1:1: error: 'test' does not name a type
1 | test
| ^~~~
|
s685047818 | p03960 | C++ | #include <bits/stdc++.h>
#define FOR(i,a,b) for(ut i=(a);i<(ut)(b);i++)
#define REP(i,b) FOR(i,0,b)
using namespace std;
typedef long long LL;
const int SIZE=305;
const LL INF=1<<30;
int maps[SIZE][SIZE];
int CAL[SIZE][SIZE];
int DP[SIZE][SIZE];
int H,W;
LL calc(int a,int b,int x){
if(max(a,b)==H) return 0;
if(CAL[a]... | a.cc: In function 'LL solve2(int)':
a.cc:2:24: error: 'ut' was not declared in this scope
2 | #define FOR(i,a,b) for(ut i=(a);i<(ut)(b);i++)
| ^~
a.cc:3:18: note: in expansion of macro 'FOR'
3 | #define REP(i,b) FOR(i,0,b)
| ^~~
a.cc:25:9: note: in expansion o... |
s967072048 | p03960 | C++ | #include <iostream>
#include <vector>
#include <list>
#include <set>
#include <bitset>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
using namespace std;
#define dfor(i,a,b) for(int i=(a);i<(b);++i)
#define drfor(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define drep(i,n) dfor(i,0,n)... | a.cc:20:19: error: 'acos' was not declared in this scope
20 | const double PI = acos(-1.0);
| ^~~~
a.cc: In function 'int main()':
a.cc:82:40: error: redeclaration of 'std::vector<char>::iterator itr1'
82 | vector<char>::iterator itr1 = b.end();
| ... |
s384538726 | p03960 | C++ | #include <cstdio>
#include <vector>
#include <algorithm>
#include <iostream>
#include <queue>
#include <string>
#include <cstdlib>
#include <cstring>
#include <set>
#include <map>
#define INT long long
#define MOD 1000000007
#define oo 1987654321
using namespace std;
INT h, w, dt[302][302][302];
string a[400];
INT dp(... | a.cc: In function 'long long int dp(int, int, int)':
a.cc:24:14: error: no matching function for call to 'min(long long int&, int)'
24 | ret = min( ret, dp(x+1, y, z) + (y>x||y==h)?0:(bool)(a[0][0]==a[x-y][1])) );
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file inclu... |
s694413012 | p03960 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
static BufferedReader in;
static PrintWriter out;
static StringTokenizer tok;
void solve() throws IOException {
int H ... | Main.java:42: error: ')' or ',' expected
sum += x1 + Math.min(Math.min(x2, x3), Math.min(x1 + x4, x1 + x5);
^
1 error
|
s182305986 | p03960 | C++ | #include <stdio.h>
#include <string.h>
#include <stack>
#include <iostream>
using namespace std;
#define LARGE_NUM 114514
using namespace std;
int main(void)
{
int H,W;
cin >> H;
cin >> W;
int b[300][300];
int c =0 ;
for(int i=0;i<h;i++){
for(int i=0;i<w;i++){
cin >> b[h][w];
}
if(b[h][0]==b[h][1... | a.cc: In function 'int main()':
a.cc:21:23: error: 'h' was not declared in this scope
21 | for(int i=0;i<h;i++){
| ^
a.cc:22:31: error: 'w' was not declared in this scope
22 | for(int i=0;i<w;i++){
| ^
|
s011152269 | p03960 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <map>
#include <set>
#include <queue>
#include <fstream>
#include <stdio.h>
#include <math.h>
using namespace std;
char dp[305][305];
int main(int argc, const char * argv[]) {
int... | a.cc: In function 'int main(int, const char**)':
a.cc:20:4: error: 'memset' was not declared in this scope
20 | memset(dp,0,sizeof(dp));
| ^~~~~~
a.cc:13:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
12 | #include <math.h>
+++ |+#include ... |
s506384853 | p03960 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<complex>
#include<string>
#include<cstring>
using namespace std;
#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
#define INF 100000000
#define debug(x) ... | a.cc: In function 'int saiki(int, int, int)':
a.cc:58:9: error: 'ts' was not declared in this scope; did you mean 'tm'?
58 | ts=0;
| ^~
| tm
|
s306678406 | p03960 | C++ | #include <stdio.h>
#include <string.h>
#include <stack>
#include <iostream>
using namespace std;
#define LARGE_NUM 114514
using namespace std;
int main(void)
{
int H,W;
cin >> H;
cin >> W;
if(W == 3){
cout << 0 << endl;
}
else{
H/=0;
break;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:21:18: warning: division by zero [-Wdiv-by-zero]
21 | H/=0;
| ~^~~
a.cc:22:17: error: break statement not within loop or switch
22 | break;
| ^~~~~
|
s865603851 | p03960 | C++ |
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#includ... | a.cc: In function 'int main()':
a.cc:84:9: error: 'memset' was not declared in this scope
84 | memset(memo,0xFF,sizeof(memo));
| ^~~~~~
a.cc:20:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
19 | #include <queue>
+++ |+#include <... |
s406886140 | p03960 | C++ | #include <cstdint>
#include <cstdio>
#include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
#include <cassert>
#include <stack>
#include <set>
#include <sstream>
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long Long;
int MAT[310][310];
int mem[310][310];
int... | a.cc: In function 'int solve2(std::string, std::string)':
a.cc:42:9: error: 'memset' was not declared in this scope
42 | memset(mem,-1,sizeof(mem));
| ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
10 | #include <sst... |
s324584398 | p03960 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin()... | a.cc: In function 'int main()':
a.cc:55:8: error: 'ma' was not declared in this scope; did you mean 'mi'?
55 | if(ma==tmp[0]){
| ^~
| mi
a.cc:57:12: error: 'i' was not declared in this scope; did you mean 'mi'?
57 | if(c[i+t[0]][0]==c[i+1+t[1]][1]) ans++;
| ^
... |
s917782537 | p03960 | C++ | #include <bits/stdc++.h>
using namespace std;
int d[301][301][301];
int onetwo[300][300];
int twothr[300][300];
int onethr[300][300];
int main()
{
ios::sync_with_stdio(0);
cin.tie(NULL);
int h, w;
cin >> h >> w;
if (w == 3) {
int n = h;
string a(n, '0'), b(n, '0'), c(n, '0');
... | a.cc: In function 'int main()':
a.cc:81:106: error: expected ')' before ';' token
81 | d[i][j][k] = min(d[i][j][k], d[i - 1][j][k] + (j == 0 ? 0 : onetwo[i - 1][j - 1]);
| ~ ^
| ... |
s293196194 | p03960 | C++ | asd | a.cc:1:1: error: 'asd' does not name a type
1 | asd
| ^~~
|
s523533497 | p03960 | C++ | #include "bits/stdc++.h"
using namespace std;
//諸機能
#pragma region MACRO
#define putans(x) std::cerr << "[ answer ]: " ; cout << (x) << endl
#define dputans(x) std::cerr << "[ answer ]: "; cout << setprecision(27) << (double)(x) << endl
#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define RREP(i,a,n) for(int i... | In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_F... |
s716882939 | p03960 | C++ | #include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using namespace std;
int h,w;
vector<string> f;
int cost[310][310][310];
int frmemo[310][310][310];
int fr(int d,int l,int r){
int he=h-max(l,r);
if... | a.cc: In function 'int fr(int, int, int)':
a.cc:17:65: error: expected ';' before 'else'
17 | if(f[h-l-1][d]==f[h-r-1][d+1]) frmemo[d][l][r]=fr(d,l+1,r+1)+1
| ^
| ;
18 | ... |
s748108983 | p03960 | C++ | #include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using namespace std;
int h,w;
vector<string> f;
int cost[310][310][310];
int frmemo[310][310][310];
int fr(int d,int l,int r){
int he=h-max(l,r);
if... | a.cc: In function 'int fr(int, int, int)':
a.cc:17:65: error: expected ';' before 'else'
17 | if(f[h-l-1][d]==f[h-r-1][d+1]) frmemo[d][l][r]=fr(d,l+1,r+1)+1
| ^
| ;
18 | ... |
s812564777 | p03960 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<math.h>
#include<map>
#include<iterator>
#include<set>
#include<queue>
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
int countx(int i, string s1, int j, string s2){
int res = 0;
for(int k = 0; k != std::min(s1.siz... | In file included 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 /usr/include/c++/14/ostream:40,
from /usr/includ... |
s593056982 | p03960 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <set>
#include <map>
#include <unordered_map>
#include <vector>
#include <queue>
#include <string>
#include <iomanip>
#include <stdio.h>
#include <cstring>
#include <random>
#include <chrono>
#include <bitset>
#include <fstream>
#inclu... | a.cc: In function 'll dp(ll, ll)':
a.cc:45:16: error: no matching function for call to 'max(int, ll)'
45 | for(ll c1 = max(0,j-i); c1 < n-i; c1++){
| ~~~^~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s409244873 | p03960 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<cstring>
#include<string>
#include <math.h>
#include<algorithm>
// #include <boost/multiprecision/cpp_int.hpp>
... | a.cc: In function 'int main()':
a.cc:94:38: error: no matching function for call to 'max(int, long long int)'
94 | for(int l=max(1,j-i+1);l<=h+1-i;l++){
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/in... |
s083965859 | p03960 | C++ | 7 10
xxxxxxxxxx
ccccxxffff
cxxcxxfxxx
cxxxxxffff
cxxcxxfxxx
ccccxxfxxx
xxxxxxxxxx | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 7 10
| ^
|
s144097217 | p03961 | C++ | #ifndef __INTMOD_H__
#define __INTMOD_H__
/* updated: 2019-10-10 */
#include <iostream>
#include <cassert>
#include <vector>
#include <cstdint>
#include <functional>
#include <unordered_map>
template <uint32_t Mod>
class IntMod {
static_assert(Mod != 0, "Mod must not be 0");
static_assert(Mod < 0x80000000, "Mod mu... | a.cc: In function 'int main()':
a.cc:677:9: error: 'RuntimeMod' has not been declared
677 | RuntimeMod::setDefaultMod(1000000007);
| ^~~~~~~~~~
a.cc:691:9: error: 'RuntimeMod' was not declared in this scope
691 | RuntimeMod hole_sum = 0;
| ^~~~~~~~~~
a.cc:692:38: error: '... |
s782126101 | p03961 | C++ | 10
0 3 0 0 1 0 4 0 0 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10
| ^~
|
s717624606 | p03961 | C++ | #include <bits/stdc++.h>
#define cadd(_x,_y) _x = add(_x, _y)
#define cpop(_x,_y) _x = pop(_x, _y)
#define cmul(_x,_y) _x = mul(_x, _y)
const int mod = 1e9 + 7;
inline int add(int a, int b) {a += b; return a >= mod ? a - mod : a;}
inline int pop(int a, int b) {a -= b; return a < 0 ? a + mod : a;}
inline int mul(int a, ... | a.cc: In function 'int main()':
a.cc:36:70: error: invalid operands of types 'int' and 'double' to binary 'operator%'
36 | for ( int i = 1 ; i <= n ; i ++ ) fac[i] = i * fac [ i - 1 ] % ( 1e9 + 3 ) ;
| ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
| ... |
s550851318 | p03961 | Java | import java.util.*;
public class Main {
private static boolean elapsed = false;
private static long sum;
private static int cnt;
public static void main(String[] args) {
long S = System.currentTimeMillis();
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[] P = new int[N];
... | Main.java:41: error: cannot find symbol
sum %= div;
^
symbol: variable div
location: class Main
1 error
|
s693522327 | p03961 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define repp(i, m, n) for(int i = m; i < n; i++)
const int INF = 100000000;
const double EPS = 1e-10;
const int MOD = 1000000007;
using namespace std;
typedef long long ll;
typedef pair<int, int> pai;
typedef pair<ll,ll> pal;
int n;
int k=0;
int... | a.cc: In function 'int main()':
a.cc:32:40: warning: pointer to a function used in arithmetic [-Wpointer-arith]
32 | lef[i+1]=left[i];
| ^
a.cc:32:40: error: invalid conversion from 'std::ios_base& (*)(std::ios_base&)' to 'int' [-fpermissive]
32... |
s302480779 | p03961 | C++ | 1232 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1232
| ^~~~
|
s308838482 | p03961 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define repp(i, m, n) for(int i = m; i < n; i++)
const int INF = 100000000;
const double EPS = 1e-10;
const int MOD = 1000000007;
using namespace std;
typedef long long ll;
typedef pair<int, int> pai;
typedef pair<ll,ll> pal;
int n;
int k=0;
int... | a.cc: In function 'int main()':
a.cc:32:25: error: reference to 'left' is ambiguous
32 | left[i+1]=left[i];
| ^~~~
In file included from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
fro... |
s657339009 | p03961 | C++ | import Control.Monad
import Control.Applicative
import Data.List
taka :: [Int] -> Int
taka xs = sum $ map (\x -> ponya (permutation $ [1..(length xs)]) x 1) (p5 ( length xs ) xs (kuwa xs 1))
ponya :: [[Int]] -> [Int] -> Int -> Int
ponya (x:xs) y n
| x == y = n
| x /= y = ponya xs y (n+1)
p5 :: Int -> [Int]... | a.cc:6:22: error: stray '\' in program
6 | taka xs = sum $ map (\x -> ponya (permutation $ [1..(length xs)]) x 1) (p5 ( length xs ) xs (kuwa xs 1))
| ^
a.cc:6:50: error: too many decimal points in number
6 | taka xs = sum $ map (\x -> ponya (permutation $ [1..(length xs)]) x 1) (p5 ... |
s497704927 | p03961 | C++ | use std::io::prelude::*;
use std::io;
fn read_to_string() -> String {
let mut buf = String::new();
let mut stdin = io::stdin();
stdin.read_to_string(&mut buf);
buf
}
fn solve(p: Vec<u64>, q: Vec<u64>) -> u64 {
let w = p.len();
let h = q.len();
let mut pq: Vec<_> = p.iter()
.map(|... | a.cc:1:1: error: 'use' does not name a type
1 | use std::io::prelude::*;
| ^~~
a.cc:2:1: error: 'use' does not name a type
2 | use std::io;
| ^~~
a.cc:4:1: error: 'fn' does not name a type
4 | fn read_to_string() -> String {
| ^~
a.cc:11:1: error: 'fn' does not name a type
11 | fn solve... |
s577548945 | p03962 | C++ | #include<stdio.h>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
#include<cmath>
#include<bitset>
#define Vsort(a) sort(a.begin(), a.end())
#define Vreverse(a) reverse(a.begin(), a.end())
#define Srep(n) for(int i = 0; i < (n); i++)
#define Lrep(i,a,n) for(int i = (a); i < (n);... | a.cc: In function 'int main()':
a.cc:28:3: error: 'set' was not declared in this scope
28 | set<int> st;
| ^~~
a.cc:9:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
8 | #include<bitset>
+++ |+#include <set>
9 |
a.cc:28:7: error: expected pri... |
s861426754 | p03962 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cstring>
#include <math.h>
#include <bitset>
#include <queue>
#include <set>
#include <iomanip>
#include <assert.h>
#include <cstdio>
// #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr long long int INFLL =... | a.cc: In function 'int main()':
a.cc:121:5: error: reference to 'data' is ambiguous
121 | data = se.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,
... |
s905123372 | p03962 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cstring>
#include <math.h>
#include <bitset>
#include <queue>
#include <set>
#include <iomanip>
#include <assert.h>
#include <cstdio>
// #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr long long int INFLL =... | a.cc: In function 'int main()':
a.cc:117:5: error: reference to 'data' is ambiguous
117 | data.insert(a);
| ^~~~
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,
... |
s756153060 | p03962 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
if(a==b&&b==c){cout<<1<<endl;}
else if(a!=b&&b!&&c||c!=a){cout<<3<<endl;}
else {cout<<2<<endl;}
} | a.cc: In function 'int main()':
a.cc:9:16: error: expected ')' before '!' token
9 | else if(a!=b&&b!&&c||c!=a){cout<<3<<endl;}
| ~ ^
| )
|
s544110474 | p03962 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
if(a==b&&b==c){cout<<1<<endl;}
else if(a!==b||b!==C||c!==a){cout<<3<<endl;}
else {cout<<2<<endl;}
} | a.cc: In function 'int main()':
a.cc:9:12: error: expected primary-expression before '=' token
9 | else if(a!==b||b!==C||c!==a){cout<<3<<endl;}
| ^
a.cc:9:19: error: expected primary-expression before '=' token
9 | else if(a!==b||b!==C||c!==a){cout<<3<<endl;}
| ^
a.cc:9:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.