submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s547125876 | p03789 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int N=501010;
char s[N];
struct Bigint
{
int a[N],n;
int& operator [] (const int &x){return a[x];}
Bigint(){memset(a,0,sizeof(a));n=0;}
Bigint(char *s){n=strlen(s);for(int i=0;i<n;i++)a[i]=s[n-i-1]-'0';}
void carry(... | a.cc: In function 'int main()':
a.cc:47:5: error: 'cout' was not declared in this scope
47 | cout<<k<<endl;
| ^~~~
a.cc:4:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
3 | #include <algorithm>
+++ |+#include <iostream>
4 | usi... |
s030815905 | p03789 | C | #include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<queue>
#define inf 2147483647
#define eps 1e-9
using namespace std;
typedef long long ll;
int n,tot,a[800001];
char s[500001];
void mul(int a[],int &n,int k){
int p=0;
tot=0;
for(int i=1;i<=n;i++){
p=a... | main.c:1:9: fatal error: algorithm: No such file or directory
1 | #include<algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s549769405 | p03789 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[500010];
int main(){
//freopen("in","r",stdin);
//freopen("out1","w",stdout);
scanf("%s",s+1);
int n=strlen(s+1);
for(int i=1;i<=n;i++) s[i]-='0';
s[0]=0;
int p=1,ans=0,flag=1,last=0;
while(p<=n){
//printf("p=%d\n",p);
i... | a.cc: In function 'int main()':
a.cc:40:5: error: 'r' was not declared in this scope
40 | r
| ^
a.cc:40:6: error: expected '}' at end of input
40 | r
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s513049279 | p03789 | C++ | #include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
namespace mp = boost::multiprecision;
int main() {
mp::cpp_int N;
cin >> N;
N *= 9;
auto check = [&](mp::cpp_int v) {
v *= 9;
auto x = (N + v).str();
for(int i = 0; i < x.size(); i++) {
v -= x[i] - '0'... | a.cc:2:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
2 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s935760118 | p03789 | C++ | #include<bits/stdc++.h>
using namespace std;
const int N=5e5+10;
char s[N];int n;
int main()
{
gets(s+1);
n=strlen(s+1);
for (int i=1;i<=n;i++) s[i]-='0';
s[n+1]=127;
int ans=0;
for (int p=1;p<=n;){
ans++;
for (int i=p,now=0;i<=n;i++){
now=max(now,(int)s[i]);
int j=i;
while (s[j]==now) j++;
if ... | a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s+1);
| ^~~~
| getw
|
s394493628 | p03789 | C++ | #include<bits/stdc++.h>
using namespace std;
long long n,num,shu[20];
long long read()
{
long long ans=0;
char ch=getchar();
while(!isdigit(ch))
ch=getchar();
for(;isdigit(ch);ch=getchar())
{
assert(ans<1000000000000000000ll);
ans=ans*10+ch-'0';
}
return ans;
}
int main()
{
n=read();
for(int i=1;i<=18;i+... | a.cc: In function 'int main()':
a.cc:21:17: error: 'value' was not declared in this scope
21 | value[i]=value[i-1]*10+1;
| ^~~~~
a.cc:23:26: error: 'value' was not declared in this scope
23 | while(n>=value[i])
| ^~~~~
|
s741818338 | p03789 | C++ | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
typedef long long ll;
const int N = 500010;
char s[N];
int n,a[N],ans;
int main(){
//freopen("in.txt","r",stdin);
//scanf("%s",s);
gets(s);
n = strlen(s);
reverse(s,s+n);
for(int i=0;i<n;i++) a[i]=s[i]-'0';
a[n] = 0;
bool pd = fals... | a.cc: In function 'int main()':
a.cc:12:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(s);
| ^~~~
| getw
|
s520017461 | p03789 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 500010;
char s[N];
int n,a[N],ans;
int main(){
//freopen("in.txt","r",stdin);
//scanf("%s",s);
gets(s);
n = strlen(s);
reverse(s,s+n);
for(int i=0;i<n;i++) a[i]=s[i]-'0';
a[n] = 0;
bool pd = false;
int pos = n;
for(int i=n-1;i>=... | a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(s);
| ^~~~
| getw
|
s026605300 | p03789 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 500010;
char s[N];
int n,a[N],ans;
int main(){
//freopen("in.txt","r",stdin);
//scanf("%s",s);
gets(s);
n = strlen(s);
reverse(s,s+n);
for(int i=0;i<n;i++) a[i]=s[i]-'0';
a[n] = 0;
bool pd = false;
int pos = n;
for(int i=n-1;i>=... | a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(s);
| ^~~~
| getw
|
s303762354 | p03789 | Java | #include <bits/stdc++.h>
using namespace std;
#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORd(i, a, b) for (int i = (a) - 1; i >= (b); i--)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++)
#define FORalld(it, a) for (__... | Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
^
Main.java:4: error: illegal character: '#'
#define ms(s, n) memset(s, n, sizeof(s))
^
Main.java:4: error: class, interface, enum, or record expected
#d... |
s042891310 | p03789 | C++ | import java.io.*;
import java.util.*;
import java.math.*;
public class Main {
Input in;
PrintWriter out;
final static int INF = (int) 1e9;
final static int MOD = (int) 1e9 + 7;
final static long LINF = (long) 1e18;
final static double PI = (double) Math.acos(-1.0);
final static double EPS = (double) 1e-9;
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: ... |
s760628988 | p03789 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int maxn = 500000 + 10;
int n, not_zero;
char s[maxn];
void addone(void) {
for (int i = n - 1; i >= not_zero; --i) {
if (s[i] != '9') {
++s[i];
break;
} else {
s[i] = '0';
}
}
}
int main(void) {
... | a.cc: In function 'int main()':
a.cc:23:10: error: 'isdigit' was not declared in this scope
23 | while (isdigit(s[n] = getchar())) ++n;
| ^~~~~~~
|
s067408066 | p03789 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int maxn = 500000 + 10;
int n, not_zero;
char s[maxn];
void addone(void) {
for (int i = n - 1; i >= not_zero; --i) {
if (s[i] != '9') {
++s[i];
break;
} else {
s[i] = '0';
}
}
}
int main(void) {
... | a.cc: In function 'int main()':
a.cc:23:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
23 | gets(s);
| ^~~~
| getw
|
s228565601 | p03789 | C++ | #include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
string strInc(string N)
{
int i = N.size()-1;
while (1){
//cout << N << endl;
if (N[i] == '9'){
N[i] = '0';
if (i == 0){
N = "1" + N;
break;
}
else{
i--;
}
}
else{
N[i]++;
break;
}
}
return ... | a.cc:34:1: error: '::main' must return 'int'
34 | void main()
| ^~~~
|
s756295352 | p03789 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Random;
import java.util.StringTokenizer;
/**
* @author Pavel Mavrin
*/
public class E {
private void solve() throws IOException {
String s = next();
z = true... | Main.java:11: error: class E is public, should be declared in a file named E.java
public class E {
^
1 error
|
s184338035 | p03790 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
template<typename A,typename B>inline ... | a.cc: In constructor 'segtree::segtree()':
a.cc:23:30: error: class 'segtree' does not have any field named 'put'
23 | segtree():dat(SEG*2,INF),put(SEG*2,INF){}
| ^~~
a.cc: In member function 'void segtree::push(long long int)':
a.cc:25:22: error: 'put' was not declared in this... |
s488499176 | p03790 | C++ | #define NDEBUG
#include <bits/stdc++.h>
#include <windows.h>
#define mset(a,b) memset(a,b,sizeof a)
#define mcpy(a,b) memcpy(a,b,sizeof b)
#define xx first
#define yy second
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define pii pair<int,int>
#define lb(x) ((x)&(-(x)))
#define dalao 1000000007
#define inf 0x3... | a.cc:3:10: fatal error: windows.h: No such file or directory
3 | #include <windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s418874345 | p03790 | C++ | #include <cstdio>
#include <algorithm>
#define Rep(i, n) for (int i = 1; i <= n; i ++)
#define Rep0(i, n) for (int i = 0; i <= n; i ++)
using namespace std;
typedef long long LL;
const int N = 100010;
int t[N * 8];
int num = 0;
void build(int x, int l, int r)
{
t[x] = 2e9;
if (l == r) return;
int mid = (l + r) >... | a.cc: In function 'int main()':
a.cc:80:30: error: 'A' was not declared in this scope
80 | else ans = 0;A
| ^
|
s239200215 | p03791 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define int ll
#define rep2(i,a,b) for(int i=a;i<=b;i++)
#define rep(i,a) rep2(i,0,a-1)
main(){
int n;cin>>n;
vector<int> v;
rep(i,n){int x;cin>>x;v.push_back(x);}
int now=0;
ll ans=1;
rep(i,n){
while(now<n and x[now]>(now-i)*2)now++;
a... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:16:19: error: 'x' was not declared in this scope
16 | while(now<n and x[now]>(now-i)*2)now++;
| ^
|
s463003137 | p03791 | C++ | oxoxoxoxoxoxoxoxoxoxoo
11223344
01234567
9*
#include <bits/stdc++.h>
#define range(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, b) for (int i = 0; i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define show(x) cerr << #x << " = " << (x) << endl;
#define int long long
using namespace std;
template <type... | a.cc:1:1: error: 'oxoxoxoxoxoxoxoxoxoxoo' does not name a type
1 | oxoxoxoxoxoxoxoxoxoxoo
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:... |
s693957492 | p03791 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<pii,int> ppii;
typedef pair<int,pii> pipi;
typedef pair<ll,ll> pll;
typedef pair<ll,pll> plpl;
typedef tuple<ll,ll,ll> tl;
ll mod=1000000007;
ll mod2=998244353;
ll inf=1000000000000000000;
#define rep(i,m,n) for(... | a.cc: In function 'int main()':
a.cc:53:16: error: cannot convert 'std::vector<long long int>' to 'll' {aka 'long long int'}
53 | ll g=f(v,now);
| ^
| |
| std::vector<long long int>
a.cc:26:9: note: initializing argument 1 of 'll f(ll)'
26 |... |
s930443132 | p03791 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int N,a,b;
string str;
cin>>str>>N;
for (int i=0;i<N;i++){
string stre(joi);
cin>>a>>b;
for (int j=a-1;j<b;j++) stre+=str[j];
int key=0;
int jk=0;
int si=b-a+1;
while(si!=0){
jk=0;
for (key=0;key<si;key++){
if (stre[key]=... | a.cc: In function 'int main()':
a.cc:9:29: error: 'joi' was not declared in this scope
9 | string stre(joi);
| ^~~
|
s605757146 | p03791 | C++ | #include<stdio.h>
long long N,r[100006];
long long sum=1;
int main(){
scanf("%lld",&N);
for(int i=0;i<N;i++){
scanf("%lld",&r[i])
}
int j=0;
for(int i=0;i<N;i++){
for(j;j<N&&2*(j-i)+1<r[j];j++);
sum*=j;
sum%=1000000007;
}
printf("%lld",sum);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:36: error: expected ';' before '}' token
9 | scanf("%lld",&r[i])
| ^
| ;
10 | }
| ~
|
s759373713 | p03791 | C++ | #include<stdio.h>
long long N,r[100006];
long long sum=1;
int main(){
scanf("%d",&N);
for(int i=0;i<N;i++){
scanf("%d",&r[i])
}
int j=0;
for(int i=0;i<N;i++){
for(j;j<N&&2*(j-i)+1<r[j];j++);
sum*=j;
sum%=1000000007;
}
printf("%d",sum);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:34: error: expected ';' before '}' token
9 | scanf("%d",&r[i])
| ^
| ;
10 | }
| ~
|
s250051012 | p03791 | C | #include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<set>
#include<string>
#include<sstream>
#include<cctype>
#include<map>
#include<stack>
#include<queue>
#include<cstdlib>
#include<ctime>
using namespace std;
#define INF 0x3f3f3f3f
typedef long long ll;
i... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s489390682 | p03791 | C++ | #include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int n, a[100005];
int main() {
scanf("%d", &n);
for( int i = 0; i < n; i++ ) scanf("%d", &a[i]);
int ans = 1, t = 0;
for( int i = 0; i < n; i++ ){
while( t<n && a[t] > (t-i)*2 ) t++;
if( t<n && a[t]==(t-i)*2 ) t++;
ans = 1LL*ans*(t-i)%mo... | a.cc: In function 'int main()':
a.cc:15:9: error: 'ansurn' was not declared in this scope
15 | ansurn 0;
| ^~~~~~
|
s226931406 | p03791 | C++ | #include <cstdlib>
#include <iostream>
int main(void) {
int n;
while (std::cin >> n) {
const int mod = 1000000007;
int stack = 0, *arr;
long long ans = 1;
arr = new int[n];
for (int i = 0; i < n; ++i) {
std::cin >> arr[i];
}
for (int i = 0; i < n; ++i) {
if (arr[i] < 2 * ++stack - 1) {
ans *= ... | a.cc: In function 'int main()':
a.cc:19:37: error: 'value' was not declared in this scope
19 | for (int i = 0; i < value; ++i) {
| ^~~~~
|
s625743662 | p03791 | C++ | #include <cstdlib>
#include <iostream>
int main(void) {
const long long mod = 1000000007;
int n;
while (std::cin >> n) {
long long ans = 1, stack = 0, *arr, *cnt;
int fail = 0;
arr = new long long[n];
cnt = new long long[n];
for (int i = 0; i < n; ++i) {
std::cin >> arr[i];
++cnt[(fail + 1) / 2... | a.cc: In function 'int main()':
a.cc:28:26: error: 'anst' was not declared in this scope; did you mean 'ans'?
28 | (anst *= stack) %= mod;
| ^~~~
| ans
|
s848532447 | p03791 | C++ | #include <cstdlib>
#include <iostream>
int main(void) {
const long long mod = 1000000007;
int n;
while (std::cin >> n) {
long long ans = 1, stack = 0, *arr, *cnt;
int fail = 0;
arr = new long long[n];
cnt = new long long[n];
for (int i = 0; i < n; ++i) {
std::cin >> arr[i];
++cnt[(fail + 1) / 2... | a.cc: In function 'int main()':
a.cc:28:26: error: 'ret' was not declared in this scope
28 | (ret *= stack) %= mod;
| ^~~
|
s177235036 | p03791 | C++ | #include <cmath>
#include <cstdlib>
#include <iostream>
long long factorial(const long long &value) {
long long ret = 1;
for (int i = 0; i < value; ++i) {
ret *= i + 1;
}
return ret;
}
int main(void) {
const long long mod = pow(10.0, 9.0) + 7;
int n;
while (std::cin >> n) {
long long ... | a.cc: In function 'int main()':
a.cc:16:23: error: cannot convert 'int*' to 'long long int*' in assignment
16 | arr = new int[n];
| ^~~~~~~~~~
| |
| int*
|
s865174945 | p03791 | C++ | #include <cmath>
#include <cstdlib>
#include <iostream>
int factorial(const int &value) {
int ret = 1;
for (int i = 0; i < value; ++i) {
ret *= i + 1;
}
return ret;
}
int main(void) {
const int mod = pow(10.0, 9.0) + 7;
while (std::cin >> n) {
int ans = 1, stack = 0, n, *arr;
arr = new ... | a.cc: In function 'int main()':
a.cc:13:28: error: 'n' was not declared in this scope; did you mean 'yn'?
13 | while (std::cin >> n) {
| ^
| yn
|
s059429981 | p03791 | C++ | #include <cstdio>
using namespace std;
const int mod = 1000000007;
inline
int modMultiple(int a, int b){return (static_cast<long long>(a) * b) % mod;}
int main()
{
int N;
scanf("%d\n", &N);
int result = 1;
int k = 0;
for (int i = 0; i < N; ++i){
int Xi;
scanf("%d", &Xi); getcha... | a.cc:1:1: error: '\U0000ff03include' does not name a type
1 | #include <cstdio>
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:12:5: error: 'scanf' was not declared in this scope
12 | scanf("%d\n", &N);
| ^~~~~
a.cc:17:27: error: 'getchar' was not declared in this scope
17 | scan... |
s551646581 | p03791 | C++ | #include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
inline
int modMultiple(int a, int b){return (static_cast<long long>(a) * b) % mod;}
int main()
{
int N;
scanf("%d\n", &N);
int result = 1;
int k = 0;
for (int i = 0; i < N; ++i){
int Xi;
scanf("%d", &Xi);... | a.cc:1:1: error: '\U0000ff03include' does not name a type
1 | #include <bits/stdc++.h>
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:12:5: error: 'scanf' was not declared in this scope
12 | scanf("%d\n", &N);
| ^~~~~
a.cc:17:27: error: 'getchar' was not declared in this scope
17 | ... |
s358453480 | p03791 | Java | //package jp.atcoder.mujin_pc_2017;
import java.io.*;
import java.math.*;
import java.util.*;
import java.text.*;
class Solver{
private Scanner stdin;
private PrintWriter stdout;
public void run(){
stdin = new Scanner(new BufferedInputStream(System.in));
stdout = new PrintWriter(new B... | Main.java:39: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s780406729 | p03791 | C++ | #include <iostream>
#define maxN 100000
#define mod 1000000007
using namespace std;
int x[maxN+10],F[maxN + 10], h[maxN + 10];
long long int result = 1;
main(){
int N;
cin >> N;
for(int i=1;i<=N;i++){
cin >> x[i];
}
F[1] = 1;
F[2] = 1;
// if(x[2] > 2){
// F[3] = 1;
// } else {
// F[3] = 2;
// }
for(int i=... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:49:24: error: expected '}' at end of input
49 | cout << result;
| ^
a.cc:9:7: note: to match this '{'
9 | main(){
| ... |
s845673683 | p03791 | C++ | #include <iostream>
#define maxN 100000
#define mod 1000000007
using namespace std;
int x[maxN+10],F[maxN + 10], h[maxN + 10];
long long int result = 1;
main(){
int N;
cin >> N;
for(int i=1;i<=N;i++){
cin >> x[i];
}
F[1] = 1;
F[2] = 1;
// if(x[2] > 2){
// F[3] = 1;
// } else {
// F[3] = 2;
// }
for(int i=... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:56:24: error: expected '}' at end of input
56 | cout << result;
| ^
a.cc:9:7: note: to match this '{'
9 | main(){
| ... |
s143742336 | p03791 | C++ | #include <iostream>
#define maxN 100000
#define mod 1000000007
using namespace std;
int x[maxN+10],F[maxN + 10], h[maxN + 10];
long long int result = 1;
main(){
int N;
cin >> N;
for(int i=1;i<=N;i++){
cin >> x[i];
}
F[1] = 1;
F[2] = 1;
// if(x[2] > 2){
// F[3] = 1;
// } else {
// F[3] = 2;
// }
for(int i=... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:56:24: error: expected '}' at end of input
56 | cout << result;
| ^
a.cc:9:7: note: to match this '{'
9 | main(){
| ... |
s606729276 | p03791 | C++ | #include <stdio.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <math.h>
#include <algorithm>
#include <string>
using namespace std;
int main()
{
int N;
cin >> N;
int* x = new int[N];
for (size_t i = 0; i < N; i++)
cin >> x[i];
int* ways = new int[N];
for (size_t j = 0; j < N; j++)
wa... | a.cc: In function 'int main()':
a.cc:29:23: error: invalid operands of types 'size_t' {aka 'long unsigned int'} and 'std::ios_base&(std::ios_base&)' to binary 'operator-'
29 | if (i - left > start)
| ~ ^ ~~~~
| | |
| | ... |
s651012055 | p03791 | C++ | dsjahfla | a.cc:1:1: error: 'dsjahfla' does not name a type
1 | dsjahfla
| ^~~~~~~~
|
s196343922 | p03791 | C++ | #include<bits/stdc++.h>
using namespace std;
bool b[3][3];
int cnt=0,m=10000,n;
void dfs(){
bool b1[3][3];
bool c[3];
if(cnt>6)return ;
int f=0;
for(int i=0;i<n;i++)
for(int j=0;j<n;j++){
if(b[i][j]==0)f=1;
b1[i][j]=b[i][j];
}
if(f==0){if(m>cnt)m=cnt;}
else{
for(int i=0;i<n;i++){
for(int j=0;j<n;j++)c... | a.cc: In function 'void dfs()':
a.cc:22:26: error: 'I' was not declared in this scope
22 | for(int l=0;l<n;l++)b[I][k]=c[l];
| ^
|
s633282743 | p03791 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
long long int ans=1, n, x;
stack<long long int> st;
while(n--){
cin >>... | a.cc: In function 'int main()':
a.cc:19:30: error: conflicting declaration 'long long int n'
19 | long long int ans=1, n, x;
| ^
a.cc:16:13: note: previous declaration as 'int n'
16 | int n;
| ^
|
s432692183 | p03791 | C++ | include<stdio.h>
#include<iostream>
#include<string.h>
using namespace std;
int moji(string s,long long int a,long long int b);
int main(){
string s;
long long int n;
long long int q[500000][2];
long long int i;
int how;
cin>>s;
cin>>n;
for(i=0;i<n;i++){
... | a.cc:1:1: error: 'include' does not name a type
1 | include<stdio.h>
| ^~~~~~~
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,
fr... |
s485671879 | p03791 | Java | import java.io.*;
import java.util.*;
public class Main {
static final int M = 1_000_000_007;
void run() {
int n = in.nextInt();
int[] x = new int[n];
for (int i = 0; i < n; i++) {
x[i] = in.nextInt();
}
long ans = 1;
int m = 0;
for (int i = 0; i < n; i++) {
if (x[i] == 2 * m) {
ans *= m + ... | Main.java:36: error: cannot find symbol
String fileName = A.class.getSimpleName().replaceFirst("_.*", "").toLowerCase();
^
symbol: class A
location: class Main
1 error
|
s554512563 | p03791 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <queue>
#include <iomanip>
using namespace std;
typedef long long ll;
#define MOD (int)(1e9+7)
int x[100000];
int n;
ll A[100001];
int main()
{
A[0] = 1;
for (int i = 1; i <= 100000; i++)A[i] = i*A[i - 1];
ci... | a.cc: In function 'int main()':
a.cc:37:24: error: expected primary-expression before 'long'
37 | ans *= long long(index[i]-cnt);
| ^~~~
|
s036671112 | p03791 | C++ | #include <iostream>
#include <vector>
#define int long long
using namespace std;
int n;
int x[100000];
signed main() {
int i, j;
cin >> n;
for (i = 0; i < n; i++) cin >> x[i];
for (i = 0; i < n; i++) x[i] -= 2 * i + 1;
for (i = 0; i < n; i++) x[i] = -x[i];
int yose = 0;
vector<int> vec;
for (i = 0; i < ... | a.cc: In function 'int main()':
a.cc:25:9: error: 'sort' was not declared in this scope; did you mean 'short'?
25 | sort(vec.begin(), vec.end());
| ^~~~
| short
|
s730513715 | p03791 | C++ | #include <iostream>
#include <vector>
#define int long long
using namespace std;
int n;
int x[100000];
signed main() {
int i, j;
cin >> n;
for (i = 0; i < n; i++) cin >> x[i];
for (i = 0; i < n; i++) x[i] -= 2 * i + 1;
for (i = 0; i < n; i++) x[i] = -x[i];
int yose = 0;
vector<int> vec;
for (i = 0; i < ... | a.cc: In function 'int main()':
a.cc:25:9: error: 'sort' was not declared in this scope; did you mean 'short'?
25 | sort(vec.begin(), vec.end());
| ^~~~
| short
|
s520995288 | p03791 | C++ | #include <vector>
#include <map>
#include <cstring>
#include <algorithm>
#include <cstdio>
#define FOR(i, a, b) for(int i = (a), _b = (b); i <= _b; i++)
using namespace std;
const long long MOD = 1000000000 + 7;
const int MAXN = 100111;
long long a[MAXN];
int n;
int main() {
ios::sync_with_stdio(false);
cin >> ... | a.cc: In function 'int main()':
a.cc:17:3: error: 'ios' has not been declared
17 | ios::sync_with_stdio(false);
| ^~~
a.cc:18:3: error: 'cin' was not declared in this scope
18 | cin >> n;
| ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#i... |
s605041851 | p03791 | C++ | >
#include <vector>
#include <map>
#include <cstring>
#include <algorithm>
#include <cstdio>
#define FOR(i, a, b) for(int i = (a), _b = (b); i <= _b; i++)
using namespace std;
const long long MOD = 1000000000 + 7;
const int MAXN = 100111;
long long a[MAXN];
int n;
int main() {
ios::sync_with_stdio(false);
cin >... | a.cc:1:1: error: expected unqualified-id before '>' token
1 | >
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_nu... |
s784566573 | p03791 | C++ | >
#include <vector>
#include <map>
#include <cstring>
#include <algorithm>
#include <cstdio>
#define FOR(i, a, b) for(int i = (a), _b = (b); i <= _b; i++)
using namespace std;
const long long MOD = 1000000000 + 7;
const int MAXN = 100111;
long long a[MAXN];
int n;
int main() {
ios::sync_with_stdio(false);
cin >... | a.cc:1:1: error: expected unqualified-id before '>' token
1 | >
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_nu... |
s469107105 | p03791 | C++ | #include <bits/stdc++.h>
using namespace std;
using pii = pair<int,int>;
using ll = long long;
#define rep(i, j) for(int i=0; i < (int)(j); i++)
#define repeat(i, j, k) for(int i = (j); i < (int)(k); i++)
#define all(v) v.begin(),v.end()
#define debug(x) cerr << #x << " : " << x << endl
template<class T> bool set_min... | a.cc: In member function 'bool Solver::solve()':
a.cc:44:17: error: 'a' was not declared in this scope
44 | cout << a << endl;
| ^
|
s726844609 | p03791 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<unordered_map>
#include<unordered_set>
#include<map>
#include<set>
#include<functional>
#define P pair<int,int>
using namespace std;
int main() {
int a; cin >> a;
if (a <= 8) {
int S = 0;
int b[8];
for (int c = 0... | a.cc: In function 'int main()':
a.cc:27:25: error: 'memset' was not declared in this scope
27 | memset(aru, true, sizeof(aru));
| ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
10 | #i... |
s095933709 | p03791 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> mat;
#define FOR(i,a,b) for(int i=(a);i<(int)(b);++i)
#define rep(i,n) FOR(i,0,n)
#define mset(a,x) memset(a,x,sizeof(a))
#define OUT(x) cout<<(x)<<"\n"
int n;
ll INF = 1145141919;
ll row[514];
ll ma = -1;
... | a.cc: In function 'll calc(mat)':
a.cc:34:30: error: too few arguments to function 'bool naname(mat)'
34 | if(cnt == 1 || naname()) return 3;
| ~~~~~~^~
a.cc:17:6: note: declared here
17 | bool naname(mat f) {
| ^~~~~~
a.cc:56:1: warning: control reaches end of non-... |
s732402144 | p03791 | C++ | import copy
def test(x,target):
r=x[target]
if target==0 or target==1:
return True
last=1
gap=0
bar=0
for i in range(0,target):
gap=gap+(x[i]-last)
bar=bar+1
last=x[i]+1
if gap<bar-1:
return False
#if x[i]+1==x[i+1]:
# retur... | a.cc:16:14: error: token "[" is not valid in preprocessor expressions
16 | #if x[i]+1==x[i+1]:
| ^
a.cc:16: error: unterminated #if
16 | #if x[i]+1==x[i+1]:
a.cc:1:1: error: 'import' does not name a type
1 | import copy
| ^~~~~~
a.cc:1:1: note: C++20 'import' only avai... |
s881973416 | p03791 | C++ | #include <iostream>
#include <vector>
int main(){
int n,sum=1,cnt=0,hoge=0,mai=std::pow(10,9)+7;
std::vector<int> su;
std::cin>>n;
for(int i=0;i<n;i++){
std::cin>>hoge;
su.push_back(hoge);
}
for(int i=0;i<n;i++){
cnt=1;
for(int j=1;j<n;j++){
if(j-i<=0)
cnt++;
else if((su[j]/(j-i))>=2)
cnt++;... | a.cc: In function 'int main()':
a.cc:4:43: error: 'pow' is not a member of 'std'
4 | int n,sum=1,cnt=0,hoge=0,mai=std::pow(10,9)+7;
| ^~~
|
s932751385 | p03791 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<set>
#include<complex>
#include<string>
#include<cstring>
using namespace std;
#define rep2(x,from,to) for(long long x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
#... | a.cc: In function 'int main()':
a.cc:44:27: error: no matching function for call to 'max(long long int, int)'
44 | tor[i]=max(i+1-M,0);
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s309715521 | p03791 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<set>
#include<complex>
#include<string>
#include<cstring>
using namespace std;
#define rep2(x,from,to) for(long long x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
#define INF 1000000... | a.cc: In function 'int main()':
a.cc:43:27: error: no matching function for call to 'max(long long int, int)'
43 | tor[i]=max(i+1-M,0);
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s483964096 | p03791 | C++ | #include <iostream>
#include <vector>
int main(){
int n,sum=1,cnt=0,hoge=0,mai=std::pow(10,9)+7;
std::vector<int> su;
std::cin>>n;
for(int i=0;i<n;i++){
std::cin>>hoge;
su.push_back(hoge);
}
for(int i=0;i<n;i++){
cnt=1;
for(int j=1;j<n;j++){
if(j-i<=0)
cnt++;
else if((su[j]/(j-i))>=2)
cnt++;... | a.cc: In function 'int main()':
a.cc:4:43: error: 'pow' is not a member of 'std'
4 | int n,sum=1,cnt=0,hoge=0,mai=std::pow(10,9)+7;
| ^~~
|
s723670161 | p03791 | C++ | #include <cstdio>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;
int n;
int a[100100];
long long frac[100100];
const int mo = 1e9 + 7;
int main(){
// freopen("in.txt","r",stdin);
scanf("%d",&n);
for (int i = 1; i <= n; i++)
scanf("%d",&a[i]);
f... | a.cc: In function 'int main()':
a.cc:21:27: error: 'h' was not declared in this scope
21 | long long ans = 1;h
| ^
a.cc:27:25: error: 'cnt' was not declared in this scope; did you mean 'int'?
27 | cnt --;
| ^~~
| ... |
s391283186 | p03791 | C++ | #include <cstdio>
#include <set>
#include <algorithm>
using namespace std;
const int mod = 1e9+7;
int n, a[100001], b[100001], cnt[100001];
int FF(int start, int num){
return max(num-(start+1)/2, 0);
}
bool meet(int p1, int p2, int num){
return (p2-2*(num-1)) <= (p1+1);
}
struct Elem{
int place, num;
... | a.cc: In function 'int main()':
a.cc:29:9: error: 'vector' was not declared in this scope
29 | vector<Elem> V;
| ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
3 | #include <algorithm>
+++ |+#include <vector>
... |
s688884128 | p03791 | C++ | int main(){
cout << -1 << endl;
} | a.cc: In function 'int main()':
a.cc:2:1: error: 'cout' was not declared in this scope
2 | cout << -1 << endl;
| ^~~~
a.cc:2:15: error: 'endl' was not declared in this scope
2 | cout << -1 << endl;
| ^~~~
|
s966419059 | p03791 | C++ | #include<bits\stdc++.h>
#define P 1000000007
#define ll long long
using namespace std;
ll n,a[10005];
int main()
{
scanf("%lld",&n);
for (ll i=1;i<=n;i++)
scanf("%lld",&a[i]);
sort(a+1,a+n+1);
ll Ans=1,sum=0;
for (ll i=1;i<=n;i++)
{
// cout<<Ans<<' '<<sum<<endl;
if (sum*2+1>a[i]+1)
Ans=Ans*sum%P;
else
... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s930408139 | p03791 | Java | import java.io.*;
import java.util.*;
public class A {
FastScanner in;
PrintWriter out;
void solve() {
final int mod = (int) 1e9 + 7;
int n = in.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = in.nextInt();
}
long res = 1;
int cnt = 0;
for (int i = 0; i < n; i++) {
int p... | Main.java:4: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s641092875 | p03792 | C++ | #include<bits/stdc++.h>
//using namespace std;
#define rep(i,j,n) for(ll i=(ll)(j);i<(ll)(n);i++)
#define REP(i,j,n) for(ll i=(ll)(j);i<=(ll)(n);i++)
#define per(i,j,n) for(ll i=(ll)(j);(ll)(n)<=i;i--)
#define ll long long
#define ALL(a) (a).begin(),(a).end()
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(... | a.cc:163:10: error: redefinition of 'const long long int MOD'
163 | const ll MOD=1e9+7;
| ^~~
a.cc:22:10: note: 'const long long int MOD' previously defined here
22 | const ll MOD=1e9+7;
| ^~~
a.cc:166:10: error: redefinition of 'const long long int MAX'
166 | const ll MAX=1e7;
... |
s880678939 | p03792 | C++ | //Link : https://atcoder.jp/contests/mujin-pc-2017/tasks/mujin_pc_2017_b
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define N 503
#define inf 200000000
char s[N][N];
void solve() {
int n;scanf("%d ", &n);
int row[N],column[N];
memset(row,0,sizeof(row));
memset(column,0,sizeof(column));
... | a.cc: In function 'void solve()':
a.cc:49:54: error: request for member 'size' in 'column[j]', which is of non-class type 'int'
49 | for(int j=0;j<n;++j) if (s[c][j]=='.'||column[j].size()!=n) tmp++;
| ^~~~
|
s115493599 | p03792 | C++ | #include <bits/stdc++.h>
using namespace std;
#ifndef ONLINE_JUDGE
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
using bll = boost::multiprecision::cpp_int;
using bdouble = boost::multiprecision::cpp_dec_float_100;
#endif
#ifdef LOCAL_DEV
void debug_impl() { std::cer... | a.cc:4:18: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
4 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s430716016 | p03792 | C++ | 3
.##
...
...
| a.cc:2:2: error: stray '##' in program
2 | .##
| ^~
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
|
s761491341 | p03792 | C++ | #include <bits/stdc++.h>
using namespace std;
constexpr int IINF = INT_MAX;
constexpr ll LLINF = LLONG_MAX;
int main() {
int n, r=0, ans = IINF;
bool ok = false;
cin >> n;
vector<string> s(n);
for(int i=0;i<n;i++) cin >> s[i];
for(int j=0;j<n;j++){
int cnt = 0;
for(int i=0;i<n;i... | a.cc:4:11: error: 'll' does not name a type
4 | constexpr ll LLINF = LLONG_MAX;
| ^~
|
s594526639 | p03792 | C++ | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
int main() {
cin.tie(nullptr); ios::sync_with_stdio(false);
int n; cin >> n;
int c = 0;
V<string> s(n);
for (auto&& e : s) {
cin >> e;
c += ... | a.cc: In function 'int main()':
a.cc:24:15: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)'
24 | mn = min(mn, count(begin(s[j]), end(s[j]), '.'));
| ~~~^~~~~~~~~~~~~~~~~~~... |
s913891175 | p03792 | C++ | #include "/Users/daikikodama/Desktop/stdc++.h"
//#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
#define int long long
#define double long double
#define mod 1000000007
#define F first
#define S second
#define P pair<long long,long long>
#define all(a) a.begin(),a.end()
#define INF 10000000000000000
... | a.cc:1:10: fatal error: /Users/daikikodama/Desktop/stdc++.h: No such file or directory
1 | #include "/Users/daikikodama/Desktop/stdc++.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s908749378 | p03792 | C++ | #include <vector>
#include <iostream>
#include <algorithm>
#include <map>
#include <queue>
#include <set>
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long ll;
typedef vector<ll> VL;
typedef pair<int, int> PII;
typedef vector<PII> VP;
typedef vector<VP> VVP;
const int maxn = 501;... | a.cc: In function 'int main()':
a.cc:27:26: error: expected ')' before ';' token
27 | VI colscount(n, 0;)
| ~ ^
| )
a.cc:27:27: error: expected primary-expression before ')' token
27 | VI colscount(n, 0;)
| ... |
s736999290 | p03792 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 1234;
int col[N];
char s[N][N];
int main()
{
int h;
scanf("%d", &h);
int w = h;
for (int i = 0; i < h; i++)
scanf("%s", s[i]);
bool any = false;
for (int i = 0; i < h; i++)
for (int j = 0; j < w; j++)
any |= (s[i][j] == '#');
if (!any)
... | a.cc: In function 'int main()':
a.cc:30:29: error: 'n' was not declared in this scope
30 | int ans = (int) 2 * n + 1;
| ^
|
s328057975 | p03792 | C++ | #include <bits/stdc++.h>
#define PAUSE system("pause")
#define LLI long long int
#define LD long double
#define PB push_back
#define PF push_front
#define MP make_pair
#define FORi(i, a, b) for(int i = a; i < b ; ++i)
#define FORd(i, a, b) for(int i = a; i > b ; --i)
using namespace std;
const int MOD = 1e9+7;
int ... | a.cc: In function 'int main()':
a.cc:51:35: error: 'col_cnt' was not declared in this scope
51 | int cnt = 0, max_raw = 0; col_cnt = 0;
| ^~~~~~~
a.cc:57:25: error: 'x' was not declared in this scope
57 | x[i][j] = (ch == '#');
| ... |
s413273263 | p03792 | C++ | #include <cstring>
#include <cstdint>
#include <iostream>
#include <string>
#include <memory>
#include <queue>
#include <limits>
char color[510][510];
bool writeable_row[510];
int row_black[510];
int tate_black[510];
bool tate_filled[510];
int filled;
int min_whiteid = -1;
int min_white = 1000;
int main() {
int N;
s... | a.cc: In function 'int main()':
a.cc:48:31: error: 'i' was not declared in this scope
48 | if (row_black[i] == N)filled++;
| ^
|
s676832026 | p03792 | C++ | #include <bits/stdc++.h>
using namespace std;
long long int N, a[514][514], l[514], c[514], i, j, f, g, ans;
//vector<long long int> low[514], col[514];
vector<pair<long long int, long long int> > vp;
char C;
int main(){
scanf("%lld", &N);
for(i = 0; i < N; ++i){
for(j = 0; j < N; ++j){
sc... | a.cc: In function 'int main()':
a.cc:46:18: error: no matching function for call to 'min(long long int&, int)'
46 | ans = min(ans, N * 2 - l[i] - g + (c[i] == 0) ? 0 : 1);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
... |
s115912510 | p03792 | Java | //Not complete
package olymp2;
import java.util.Scanner;
/**
* Created by nickie on 25.02.17 at 14:21
* <p>
* yahoo
*/
public class Task2 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
char grid[][] = new char[N][N];
... | Main.java:13: error: class Task2 is public, should be declared in a file named Task2.java
public class Task2 {
^
1 error
|
s491418321 | p03792 | C++ | #include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdio>
#include <fstream>
#include <map>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <set>
#include <queue>
#include <list>
using namespace std;
char s[505][505];
int x[505],y[505];... | a.cc: In function 'int main()':
a.cc:24:27: error: 'gets' was not declared in this scope; did you mean 'getw'?
24 | for(int i=1;i<=n;++i) gets(s[i]+1);
| ^~~~
| getw
|
s889281849 | p03792 | C++ | #include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdio>
#include <fstream>
#include <map>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <set>
#include <queue>
#include <list>
using namespace std;
char s[505][505];
int x[505],y[505];... | a.cc: In function 'int main()':
a.cc:24:27: error: 'gets' was not declared in this scope; did you mean 'getw'?
24 | for(int i=1;i<=n;++i) gets(s[i]+1);
| ^~~~
| getw
|
s358055693 | p03792 | C++ | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
vector<vector<char> > ch(vector< vector<char> > mp, int a, int b, int n) {
vector< vector<char> > mpp = mp;
for (int i = 0; i < n; i++) {
mpp[i][b] = mp[a][i];
}
return mpp;
}
int cc(vector< vector<char> > mp, int n) {
bool h = true;
... | a.cc: In function 'int cc(std::vector<std::vector<char> >, int)':
a.cc:19:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
19 | if (mp[i][j] != "#") {
a.cc:30:69: error: expected ';' before '}' token
30 | a = min(a, 1+cc(ch(mp... |
s983567092 | p03792 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZER... | a.cc: In function 'void solve()':
a.cc:42:13: error: redeclaration of 'int ok'
42 | int ok=0;
| ^~
a.cc:25:13: note: 'int ok' previously declared here
25 | int ok=0;
| ^~
|
s879894958 | p03792 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<(n);i++)
#define ALL(c) (c).begin(... | a.cc: In function 'int main()':
a.cc:47:33: error: 'i' was not declared in this scope
47 | rep(j, N) if (c[i][j] == '#') {
| ^
|
s981654503 | p03792 | C++ | #include <iostream>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
vector< vector<char> > mp(n, vector<char>(n));
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> mp[i][j];
}
}
vector<int> d(n, 0);
vector<int> d2(n, 0);
int MAX ... | a.cc: In function 'int main()':
a.cc:44:39: error: 's' was not declared in this scope; did you mean 'ss'?
44 | } else if (aa == 2 || s[0] == "#." || s[1] == ".#") {
| ^
| ss
|
s139917694 | p03792 | C++ | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
class Board{
public:
Board(int n){
vector<char> tmp;
for(int i=0;i<n;i++){
tmp.push_back('#');
}
for(int i=0;i<n;i++){
board.push_back(tmp);
... | a.cc: In function 'int astar(std::priority_queue<Board, std::vector<Board>, std::greater<Board> >, std::vector<Board>)':
a.cc:131:45: error: no matching function for call to 'std::vector<Board>::push_back()'
131 | closedList.push_back();
| ~~~~~~~~~~~~~~~~~~~~^~
I... |
s136249230 | p03792 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int n,a[505][505],b[505],Ans,Mn;
char nc()
{
char c=getchar();
while(c!='#'&&c!='.') c=getchar();
return c;
}
int main()
{
scanf("%d",&n);
for (int i=1;i<=n;i++)b[i]=1;
for (int i=1;i<=n;i++)
for (int j=1;j<=n;j++)
a[i][j]=(nc()=='#'),b... | a.cc: In function 'int main()':
a.cc:18:51: error: 'sum' was not declared in this scope
18 | a[i][j]=(nc()=='#'),b[j]&=a[i][j],sum+=b[j];
| ^~~
a.cc:19:14: error: 'sum' was not declared in this scope
19 | if (!sum) return puts("-1"),0... |
s213681633 | p03792 | C++ | #include <cstring>
#include <cstdint>
#include <iostream>
#include <string>
#include <memory>
#include <queue>
#include <limits>
char color[510][510];
char writeable_row[510];
int row_black[510];
int tate_black[510];
bool tate_filled[510];
int filled;
int min_whiteid = -1;
int min_white = INT_MAX;
int main() {
int N;... | a.cc:16:17: error: 'INT_MAX' was not declared in this scope
16 | int min_white = INT_MAX;
| ^~~~~~~
a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
7 | #include <limits>
+++ |+#include <climits>
8 |
|
s919078419 | p03792 | C++ | #include <iostream>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
vector< vector<char> > mp(n, vector<char>(n));
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> mp[i][j];
}
}
vector<int> d(n, 0);
vector<int> d2(n, 0);
int MAX ... | a.cc: In function 'int main()':
a.cc:62:28: error: 's' was not declared in this scope; did you mean 'ss'?
62 | } else if (s[0] == "##." || s[1] == "##." || s[1] == ".##" || s[2] == ".##" || s[0] == "#.#" || s[2] == "#.#") {
| ^
| ss
|
s693915241 | p03792 | C++ | #include <cstdio>
#include <queue>
#include <iostream>
#include <cstring>
using namespace std;
int n;
string board[505];
int dist[505][505];
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++) {
cin >> board[i];
}
memset(dist, -1, sizeof dist);
queue< pair<int,int> > q;
for (int i = 0; i < n; i++) {
f... | a.cc: In function 'int main()':
a.cc:46:17: error: 'sort' was not declared in this scope; did you mean 'short'?
46 | sort(dist[i], dist[i] + n);
| ^~~~
| short
|
s364115368 | p03792 | C++ | // package atcoder.other2017.mujin2017;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
public class Main {
static final int INF = 100000;
public static void main(String[] args) {
InputReader in = ne... | a.cc:3:1: error: 'import' does not name a type
3 | import java.io.IOException;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.io.InputStream;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodu... |
s015347493 | p03792 | C++ | #include <cstdio>
#include <queue>
#include <climits>
#include <vector>
#include <algorithm>
using namespace std;
char dat[510][510];
int solve(vector<string> dat) {
int n = dat.size();
int ans = INT_MAX;
vector<int> colwhite(n), rowwhite(n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {... | a.cc:13:18: error: 'string' was not declared in this scope
13 | int solve(vector<string> dat) {
| ^~~~~~
a.cc:6:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
5 | #include <algorithm>
+++ |+#include <string>
6 |
a.cc:13... |
s105201973 | p03792 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,maxi=0,i,j,row[10005],col[1000],in,c1=0,c2=0;
char a[600][600];
scanf("%d",&n);
for(i=0;i<n;i++)
{
int c=0;
for(j=0;j<n;j++)
{
scanf(" %c",&a[i][j]);
if(a[i][j]=='#')
c++,c2++;
}
row[i]=c;
if(row[i]>maxi)
maxi=row[i],in=i;
}... | a.cc: In function 'int main()':
a.cc:46:25: error: 'c' was not declared in this scope
46 | c++;
| ^
a.cc:51:25: error: 'c' was not declared in this scope
51 | c++;
| ^
|
s300033995 | p03792 | C++ | #include <bits/stdc++.h>
using namespace std;
#define For(i,l,r) for (int i = l; i <= r; ++i)
#define Cor(i,l,r) for (int i = l; i >= r; --i)
int n;
char A[555][555];g
int main() {
cin >> n;
For(i,1,n) scanf("%s", A[i] + 1);
int full_col = 0;
bool full_row = 0;
For(i,1,n) {
bool x = true;
For(j,1,n) if (A[i]... | a.cc:8:18: error: 'g' does not name a type
8 | char A[555][555];g
| ^
|
s683752394 | p03792 | C++ | int main(){
int ans = -1;
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:3:1: error: 'cout' was not declared in this scope
3 | cout << ans << endl;
| ^~~~
a.cc:3:16: error: 'endl' was not declared in this scope
3 | cout << ans << endl;
| ^~~~
|
s840457230 | p03792 | C++ | int main(){
cout << -1 << endl;
} | a.cc: In function 'int main()':
a.cc:2:1: error: 'cout' was not declared in this scope
2 | cout << -1 << endl;
| ^~~~
a.cc:2:15: error: 'endl' was not declared in this scope
2 | cout << -1 << endl;
| ^~~~
|
s729841306 | p03792 | C++ | #include <vector>
#include <iostream>
#include <string>
#include <map>
#include <algorithm>
#include <set>
#include <queue>
#include <cstdio>
#include <utility>
#include <bitset>
#include <complex>
#include <stack>
#include <tuple>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef tuple<ll,ll... | a.cc: In function 'int main()':
a.cc:58:24: error: no matching function for call to 'min(ll&, long long unsigned int)'
58 | ans=min(ans,(ll)cost+todo.size());
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:62,
from a.cc:1:
/... |
s970841326 | p03792 | C++ | #include <vector>
#include <iostream>
#include <string>
#include <map>
#include <algorithm>
#include <set>
#include <queue>
#include <cstdio>
#include <utility>
#include <bitset>
#include <complex>
#include <stack>
#include <tuple>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef tuple<ll,ll... | a.cc: In function 'int main()':
a.cc:26:21: error: expected unqualified-id before 'not' token
26 | vector<int> not;
| ^~~
a.cc:34:28: error: expected primary-expression before '.' token
34 | not.push_back(x);
| ^
a.cc:58:41... |
s801802972 | p03793 | C++ | //#pragma GCC optimize(2)
//#include<bits/stdc++.h>
//using namespace std;
//stack <char> q;
//char a[1200000];
//inline int read() {
// int X=0,w=0;
// char ch=0;
// while(!isdigit(ch)) {
// w|=ch=='-';
// ch=getchar();
// }
// while(isdigit(ch)) X=(X<<3)+(X<<1)+(ch^48),ch=getchar();
// return w?-X:X;
//}
//int main... | a.cc: In function 'int main()':
a.cc:141:9: error: 'w' was not declared in this scope
141 | w=read();
| ^
|
s286867608 | p03793 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
typedef pair<double,int>Q;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc secon... | a.cc: In function 'int main()':
a.cc:48:27: error: request for member 'size' in 'str', which is of non-class type 'char [500005]'
48 | for(int i=0;i<str.size();i++){
| ^~~~
|
s528528019 | p03793 | C++ | //http://mujin-pc-2017.contest.atcoder.jp/tasks/mujin_pc_2017_c
#include <bits/stdc++.h>
using namespace std;
const int maxn = 500100;
const int maxj = 30;
int next[maxn][30],f[maxn][maxj],a[maxn],n,q;
string s;
int main() {
ios_base::sync_with_stdio(0);
// freopen("in.txt","r",stdin);
cin>>s;
int n ... | a.cc: In function 'int main()':
a.cc:20:13: error: reference to 'next' is ambiguous
20 | next[i][c]=-1;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c+... |
s323161877 | p03793 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pdd pair<double,double>
#define X first
#define Y second
#define REP(i,a) for(int i=0;i<a;++i)
#define REPP(i,a,b) for(int i=a;i<b;++i)
#define FILL(a,x) memset(a,x,sizeof(a))
#define foreach( g... | a.cc: In function 'void make()':
a.cc:37:14: error: reference to 'next' is ambiguous
37 | FILL(next,-1);
| ^~~~
a.cc:11:26: note: in definition of macro 'FILL'
11 | #define FILL(a,x) memset(a,x,sizeof(a))
| ^
In file included from /usr/include/c++/14/bits/... |
s407238129 | p03793 | C++ | #include <bits/stdc++.h>
#define X first
#define Y second
#define mp make_pair
using namespace std;
typedef pair<int,int> PII;
const int N = 500010;
char s[N];
int n,m,x,y,f[N][30],a[N];
bool ans[100010];
PII q[100010];
bool pd[N];
vector<int> v[N],Q[N];
void dfs(int x){
pd[x]=true;
for(int i=0;i<Q[x].size();i++) {
... | a.cc: In function 'int main()':
a.cc:24:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
24 | gets(s+1);
| ^~~~
| getw
|
s307025866 | p03793 | C++ | #include<bits/stdc++.h>
#define idx(x) (x-'a')
using namespace std;
const int maxn=5e5+10;
const int inf=1061109567;
char s[maxn];
int n,q,next[maxn][27];
int main()
{
int i,j,k;
scanf("%s%d",s+1,&q);
memset(next,inf,sizeof(next));
for(n=0;s[n+1];n++);
for(i=1;i<=n;i++)
next[i][idx(s[i])]=i... | a.cc: In function 'int main()':
a.cc:12:12: error: reference to 'next' is ambiguous
12 | memset(next,inf,sizeof(next));
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.