submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s653048032 | p04026 | C++ | void solve(){
string s; cin >> s;
for( int i = 0; i + 1 < s.size(); ++i )
if( s[ i ] == s[ i + 1 ] ){
cout << i + 1 << " " << i + 2 << "\n";
return;
}
for( int i = 0; i + 2 < s.size(); ++i )
if( s[ i ] == s[ i + 2 ] ){
cout << i + 1 << " " << i + 3... | a.cc: In function 'void solve()':
a.cc:2:5: error: 'string' was not declared in this scope
2 | string s; cin >> s;
| ^~~~~~
a.cc:2:15: error: 'cin' was not declared in this scope
2 | string s; cin >> s;
| ^~~
a.cc:2:22: error: 's' was not declared in this scope
2 | ... |
s759425671 | p04026 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define reps(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
#define allsort(v) sort(v.begin(),v.end())
#define allsortg(v)sort(v.begin(),v.end(),greater<int>());
const ll mod = 1e9 + 7;
co... | a.cc: In function 'int main()':
a.cc:31:9: error: 'else' without a previous 'if'
31 | else cout << -1 << " " << -1 << "\n";
| ^~~~
|
s837951468 | p04026 | Java | public class Main {
static final Scanner sc = new Scanner(System.in);
static final PrintWriter out = new PrintWriter(System.out,false);
static boolean debug = false;
static void solve() {
String str = sc.next();
List<List<Integer>> pos = new ArrayList<List<Integer>>();
for(int i=0; i<26; i++) {
pos.ad... | Main.java:3: error: cannot find symbol
static final Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
static final PrintWriter out = new PrintWriter(System.out,false);
^
symbol: class PrintWriter
location: c... |
s197136109 | p04026 | Java | import java.util.Scanner;
public class Main {
static boolean flag = false;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
for(int i = 0; i < s.length()-1; i++) {
String subst = s.substring(i, i+2);
if(subst.charAt(0) == subst.charAt(1)) {
System... | Main.java:75: error: class, interface, enum, or record expected
import java.util.Scanner;
^
1 error
|
s341121718 | p04026 | C++ | #include <iostream>
#include <set>
#include <string>
int main()
{
using namespace std;
string s;
cin >> s;
set<char> st;
set<unsigned long long> counts;
multiset<char> mset;
for( auto c: s){
st.insert( c);
mset.insert( c);
}
for( auto c: st){
counts.insert( mset.count( c));
}... | a.cc: In function 'int main()':
a.cc:20:26: error: no match for 'operator/' (operand types are 'std::set<long long unsigned int>::reverse_iterator' {aka 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long unsigned int> >'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
20 | ... |
s315460714 | p04026 | Java |
import java.io.*;
import java.math.*;
import java.util.*;
import static java.util.Arrays.*;
public class D {
private static final int mod = (int)1e9+7;
final Random random = new Random(0);
final IOFast io = new IOFast();
/// MAIN CODE
public void run() throws IOException {
// int TEST_CASE = Integer.parseInt... | Main.java:8: error: class D is public, should be declared in a file named D.java
public class D {
^
1 error
|
s737289149 | p04026 | Java |
import java.io.*;
import java.math.*;
import java.util.*;
import static java.util.Arrays.*;
public class D {
private static final int mod = (int)1e9+7;
final Random random = new Random(0);
final IOFast io = new IOFast();
/// MAIN CODE
public void run() throws IOException {
// int TEST_CASE = Integer.parseInt... | Main.java:8: error: class D is public, should be declared in a file named D.java
public class D {
^
1 error
|
s292993243 | p04026 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <c... | a.cc: In function 'int main()':
a.cc:48:14: error: expected '}' at end of input
48 | return 0;
| ^
a.cc:22:12: note: to match this '{'
22 | int main() {
| ^
|
s713749940 | p04026 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef unsigned int uint;
typedef long long int ll;
typedef unsigned long long int ull;
#define debugv(v) printf("L%d %s => ",__LINE__,#v);for(auto e:v){cout<<e<<" ";}cout<<endl;
#define debugm(m) printf("L%d %s is..\n",__LINE__,#m);for(auto v:m){for(auto e:v){cout<<e<<" ... | a.cc: In function 'int main()':
a.cc:30:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
30 | gets(str);
| ^~~~
| getw
|
s371802786 | p04026 | C++ | #include <bits/stdc++.h>
using namespace std ;
#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#d... | a.cc: In function 'int main()':
a.cc:85:22: error: return-statement with no value, in function returning 'int' [-fpermissive]
85 | if(s.size() > 100) return ;
| ^~~~~~
|
s360914827 | p04026 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cassert>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <bitset>
#include <unordered_map>
#include <unordered_set>
#include <tuple>
#include <queue>
using namespace std;
#define pb push_... | a.cc: In function 'int main()':
a.cc:51:13: error: 'strlen' was not declared in this scope
51 | int n = strlen(s);
| ^~~~~~
a.cc:16:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
15 | #include <queue>
+++ |+#include <cstring>
... |
s937676703 | p04026 | C++ | #include<cstdio>
#include<cstring>
using namespace std;
const int MAX = 100000 + 10;
char str[MAX];
int main(){
gets(str);
int len = strlen(str);
int ansl = -1, ansr = -1;
for(int i = 0 ; i < len-1 ; i++){
if(str[i] == str[i+1]){
ansl = i+1, ansr = i+2;
}
}
for(int i = 0 ; i < len-2 ; i++){
... | a.cc: In function 'int main()':
a.cc:7:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(str);
| ^~~~
| getw
|
s497558441 | p04027 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
class Solution{
private:
const int MOD = 1e9 + 7;
public:
int sum(int N, int C, const vector<int>& X){
int max_num = *max_element(X.begin(), X.end());
vector<vector<long long>> mypow(max_num + 1, vector<long long>(... | a.cc: In member function 'int Solution::sum(int, int, const std::vector<int>&)':
a.cc:15:24: error: 'max_element' was not declared in this scope
15 | int max_num = *max_element(X.begin(), X.end());
| ^~~~~~~~~~~
a.cc: In member function 'std::vector<std::vector<long long int> > S... |
s575602918 | p04027 | C | #include<bits/stdc++.h>
#define M 1000000007
#define N 505
#define ll long long
#define ri register int
using namespace std;
inline int read()
{
int f=1,x=0;
char ch=getchar();
while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}
while(isdigit(ch)){x=x*10+ch-'0';ch=getchar();}
return f*x;
}
int n,c,l,sum[505][505]... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s479251969 | p04027 | C++ | #include <bits/stdc++.h> // clang-format off
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define each(x,v) for(auto& x : v)
#define all(v) (v).begin(),(v).end()
#define sz(v) ((int)(v).size())
#define ini(...) int __VA_ARGS__; in(__VA_ARGS__)
#define inl(...) long long __VA_ARGS__; ... | a.cc:678:13: error: non-local lambda expression cannot have a capture-default
678 | auto mul = [&](const FPS::P &a, const FPS::P &b) {
| ^
|
s545786676 | p04027 | C++ | #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<un... | a.cc: In function 'void solve()':
a.cc:129:44: error: 'modpow' was not declared in this scope
129 | dp[i + 1][j] += dp[i][k] * modpow(a[i], j - k);
| ^~~~~~
|
s719276219 | p04027 | Java | import java.util.*;
import java.io.*;
public class arc59e
{
public static void main(String[] args) { new arc59e(); }
FS in = new FS();
PrintWriter out = new PrintWriter(System.out);
int n, c;
long mod = (long)1e9 + 7;
int[] a, b;
long[][] pre, dp;
arc59e() {
n = in.nextInt();
c = in.nextInt();
... | Main.java:4: error: class arc59e is public, should be declared in a file named arc59e.java
public class arc59e
^
1 error
|
s317405309 | p04027 | C++ |
#include<iostream>
#include <cstdio>
#include<algorithm>
#define LL long long
#define INF 0x3f3f3f3f
//#define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
const int MAXN = 405;
const LL mod = 1e9+7;
LL sum[MAXN];
LL A[MAXN],B[MAXN];
LL dp[MAXN][MAXN];
LL N,C;
using namespace std;
void calc(int a, int b) {
mems... | a.cc: In function 'void calc(int, int)':
a.cc:17:9: error: 'memset' was not declared in this scope
17 | memset(sum,0,sizeof(sum));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<algorithm>
+++ |+#inc... |
s232177455 | p04027 | C++ |
#include<bits/stdc++.h>
#include<algorithm>
#define LL long long
#define INF 0x3f3f3f3f
//#define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
const int MAXN = 405;
const LL mod = 1e9+7;
LL sum[MAXN];
LL A[MAXN],B[MAXN];
LL dp[MAXN][MAXN];
LL N,C;
LL calc(int a, int b)
{
memset(sum,0,sizeof(sum));
for(i... | a.cc: In function 'long long int calc(int, int)':
a.cc:27:1: warning: no return statement in function returning non-void [-Wreturn-type]
27 | }
| ^
a.cc: In function 'int main()':
a.cc:32:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
32 | cin >> N >> C;
| ^~~
|... |
s946182055 | p04027 | C++ |
#include<bits/stdc++.h>
#include<algorithm>
#define LL long long
#define INF 0x3f3f3f3f
#define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
const int MAXN = 405;
const LL mod = 1e9+7;
LL sum[MAXN];
LL A[MAXN],B[MAXN];
LL dp[MAXN][MAXN];
LL N,C;
LL calc(int a, int b)
{
memset(sum,0,sizeof(sum));
for(int... | a.cc: In function 'long long int calc(int, int)':
a.cc:27:1: warning: no return statement in function returning non-void [-Wreturn-type]
27 | }
| ^
a.cc: In function 'int main()':
a.cc:6:12: error: 'ios' has not been declared
6 | #define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
| ... |
s528986906 | p04027 | C++ |
#include<bits/stdc++.h>
#include<algorithm>
#include<iostream>
#define LL long long
#define INF 0x3f3f3f3f
#define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
const int MAXN = 405;
const LL mod = 1e9+7;
LL sum[MAXN];
LL A[MAXN],B[MAXN];
LL dp[MAXN][MAXN];
LL N,C;
LL calc(int a, int b)
{
memset(sum,0,sizeof... | a.cc: In function 'long long int calc(int, int)':
a.cc:28:1: warning: no return statement in function returning non-void [-Wreturn-type]
28 | }
| ^
a.cc: In function 'int main()':
a.cc:7:12: error: 'ios' has not been declared
7 | #define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
| ... |
s736198314 | p04027 | C++ |
#include<bits/stdc++.h>
#include<iostream>
#define LL long long
#define INF 0x3f3f3f3f
#define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
const int MAXN = 405;
const LL mod = 1e9+7;
LL sum[MAXN];
LL A[MAXN],B[MAXN];
LL dp[MAXN][MAXN];
LL N,C;
LL calc(int a, int b)
{
memset(sum,0,sizeof(sum));
for(int ... | a.cc: In function 'long long int calc(int, int)':
a.cc:27:1: warning: no return statement in function returning non-void [-Wreturn-type]
27 | }
| ^
a.cc: In function 'int main()':
a.cc:6:12: error: 'ios' has not been declared
6 | #define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
| ... |
s790527141 | p04027 | C++ | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.TreeMap;
public class Main {
static int MOD=1000000007;
static long p[][]=new long[405][405];
static long sum[][]=new long[405][405];
static long dp[][]=new long[405][405];
static long a[]=new ... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.BufferedReader;
| ^~~~~~
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.io.InputStreamReader;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available wit... |
s509822450 | p04027 | C++ | #include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll mod=1e9+7;
ll p[406][406];
ll pre[406][406];
ll dp[406][406]={};
ll a[406],b[406];
int main()
{
p[0][0]=1;
for(ll i=1;i<=400;i++)
{
p[i][0]=1;
pre[i][0]=1;
for(ll j=1;j<=400;j++)
{
p[i][j]=... | a.cc: In function 'int main()':
a.cc:54:23: error: invalid operands of types 'const long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
54 | cout<<dp[n][c]&mod<<endl;
| ~~~^~~~~~
|
s370586932 | p04027 | C++ | #include <bits/stdc++.h>
#define fr(i, n, m) for(int i = (n); i < (m); i ++)
#define pb push_back
#define st first
#define nd second
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7;
ll f[400][400];
ll modpow(ll x, int k){
if(f[x][k] != -1) return f[x][k];
if(k == 0){
return 1;
}
l... | a.cc: In function 'int main()':
a.cc:34:26: error: 'dp' was not declared in this scope; did you mean 'dup'?
34 | memset(f, -1, sizeof(dp));
| ^~
| dup
|
s825858372 | p04027 | C++ | #include "bits/stdc++.h"
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,x,n) for(int i=x;i<n;i++)
#define ALL(v) (v).begin(),(v).end()
typedef long long LL;
typedef pair<int, int> PI;
typedef vector<int> VI;
const LL MOD = 1000000007LL;
LL Pow[401][401]; //i^j
LL Sum[401][401][401]; //Σx^iをx=j... | a.cc:51:2: error: stray '#' in program
51 | }#include "bits/stdc++.h"
| ^
a.cc:51:3: error: 'include' does not name a type
51 | }#include "bits/stdc++.h"
| ^~~~~~~
a.cc:59:10: error: redefinition of 'const LL MOD'
59 | const LL MOD = 1000000007LL;
| ^~~
a.cc:9:10: note: 'const LL ... |
s145955348 | p04027 | C++ | #pragma region include
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <sstream>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <cstring>
#include <vector>
#include <tuple>
#include <bitset>
#include <queue>
#include <complex>
#include <set>
#include <map>
#inc... | a.cc: In function 'void solve()':
a.cc:63:41: error: 'powMod' was not declared in this scope
63 | temp += powMod(x,c);
| ^~~~~~
|
s990576888 | p04027 | C++ | #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <cmath>
#include <map>
#include <set>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define INF_LL 1e18
#define INF 1e9
#define REP(i, n) for(int i = ... | a.cc: In function 'int main()':
a.cc:106:108: error: expected ')' before ';' token
106 | sum = (sum + (dp[i][j-k] * (mul[B[i]][k] - mul[A[i]-1][k] + mod)%mod) % mod;
| ~ ^
... |
s959084471 | p04027 | C++ | using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
// (づ°ω°)づミe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solver
{
const int MOD = 1000000007;
public void Solve()
{
int n = ReadInt();
int m... | a.cc:50:6: error: invalid preprocessing directive #region
50 | #region Main
| ^~~~~~
a.cc:86:6: error: invalid preprocessing directive #endregion
86 | #endregion
| ^~~~~~~~~
a.cc:88:6: error: invalid preprocessing directive #region
88 | #region Read / Write
| ^~~~~~... |
s043030912 | p04027 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;
long long mod=1000000007;
long long calc(long long p,int q){
long long ans =1;
for(int i=0;i<q;i++){
ans = (ans*p)%mod;
}
return ans;
}
int main(){
long long ruijo[401][401]={};
for(int t=0;... | a.cc: In function 'int main()':
a.cc:51:18: error: expected '}' at end of input
51 | return 0;
| ^
a.cc:19:11: note: to match this '{'
19 | int main(){
| ^
|
s282610482 | p04027 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;
#define mod 1000000007;
int calc(long long p,int q){
long long ans =1;
for(int i=0;i<q;i++){
ans = ans * p %mod;
}
return ans;
}
int main(){
long long ruijo[401][401]={};
for(int t=0;t<401;t++... | a.cc: In function 'int main()':
a.cc:8:23: error: expected ')' before ';' token
8 | #define mod 1000000007;
| ^
a.cc:44:105: note: in expansion of macro 'mod'
44 | dp[x][y]=(dp[x][y]+(dp[x-1][y-z]*(ruijo[z][b[x-1]]-ruijo[z][a[x-1]-1]))%mod)%mod;
|... |
s624674140 | p04027 | C++ | #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <complex>
//cin.sync_w... | a.cc:45:49: error: specialization of 'template<class _Tp> struct std::hash' in different namespace [-fpermissive]
45 | template<typename S, typename T> struct hash<pair<S, T>> {
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_bvector... |
s320561563 | p04027 | C | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod=1e9+7;
ll add(ll a,ll b){
return (a+b)%mod;
}
ll mul(ll a,ll b){
return (a*b)%mod;
}
#define MAX 405
int n,c;
int X[MAX],Y[MAX];
ll dp[2][MAX];
ll cost[2][MAX];
int main(){
cin>>n>>c;
for(int i=1;i<=n;i++)cin>>X[i];
for(int i=1;i<=n... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s073573883 | p04027 | C++ | #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <complex>
//cin.sync_w... | a.cc:36:15: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::tuple<int, int, int>; _Tp = long long int; _Hash = std::hash<std::tuple<int, int, int> >; _Pred = std::equal_to<std::tuple<int, int, int> >; _Alloc = std::allocator<std::pair<const std::tup... |
s119519354 | p04027 | C | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod=1e9+7;
ll add(ll a,ll b){
return (a+b)%mod;
}
ll mul(ll a,ll b){
return (a*b)%mod;
}
#define MAX 405
int n,c;
int X[MAX],Y[MAX];
ll dp[2][MAX];
ll cost[2][MAX];
int main(){
cin>>n>>c;
for(int i=1;i<=n;i++)cin>>X[i];
for(int i=1;i<=n... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s425692109 | p04027 | C | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod=1e9+7;
ll add(ll a,ll b){
return (a+b+mod+mod)%mod;
}
ll mul(ll a,ll b){
return (a*b)%mod;
}
ll mpow(ll a,ll b){
if(b==0)return 1;
ll res=mpow( mul(a,a) , b/2);
if(b%2==1)res=mul(res,a);
return res;
}
int n,c;
int X[500],Y[500];
ll d... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s206588391 | p04027 | C++ | #include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <memory>
#include <complex>
#include <numeric>
#include <cstdio>
#include <iomanip>
#define REP(i,m,n) for(int i=int(m);i<int(n);i++)... | a.cc: In function 'int main()':
a.cc:81:16: error: no matching function for call to 'shuffle(std::vector<int>::iterator, std::vector<int>::iterator)'
81 | shuffle(all(a));
| ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:3:
/usr/include/c++/14... |
s059909470 | p04027 | C++ | #include <iostream>
using namespace std;
typedef long long ll;
const ll MOD = 1000 * 1000 * 1000 + 7;
const int MAX_N = 410;
const int MAX_C = 410;
int a[MAX_N], b[MAX_N], n, c;
ll memo[MAX_N][MAX_C];
ll pow_mod(ll a, ll n, ll mod) {
if (n == 0) return 1;
if (n % 2 == 0) {
ll temp = pow_mod(a, n / ... | a.cc: In function 'int main()':
a.cc:44:5: error: 'memset' was not declared in this scope
44 | memset(memo, -1, sizeof(memo));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstrin... |
s652357811 | p04027 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#define INF 2000000010
#define mod7 1000000007
#define YJ 1145141919
#define INF_INT_MAX 2147483647
#define INF_LL_MAX 9223372036854775807
#define INF_LL 9223372036854775
#define EPS 1e-10
#def... | a.cc: In function 'int main()':
a.cc:61:3: error: 'memset' was not declared in this scope
61 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include <algorithm>
+++ |+#include <cstring>
8... |
s342491957 | p04027 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MODULO = (int) 1e9 + 7;
const int N = 405;
int a[N], b[N], power[N], sum[N];
int f[N][N];
int psum[N][N];
int F(int n, int c) {
if (n == 0) return c == 0 ? 1 : 0;
int &res = f[n][c];
if (res != -1) return res;
res = 0;
for (int x = 0; x <= c;... | a.cc: In function 'int main()':
a.cc:30:19: error: expected ';' before 'ne0'
30 | for (int i ne0; i < n; ++i)
| ^~~~
| ;
a.cc:30:20: error: 'ne0' was not declared in this scope
30 | for (int i ne0; i < n; ++i)
| ^~~
a.cc:30:3... |
s565656627 | p04028 | C++ | #include <bits/stdc++.h>
#include "../lib/math/modpow.hpp"
using namespace std;
#define SZ(x) (int)(x.size())
#define REP(i, n) for(int i=0;i<(n);++i)
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define RREP(i, n) for(int i=(int)(n);i>=0;--i)
#define RFOR(i, a, b) for(int i=(int)(a);i>=(int)(b);--i)
#define ALL(a) ... | a.cc:2:10: fatal error: ../lib/math/modpow.hpp: No such file or directory
2 | #include "../lib/math/modpow.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s570699926 | p04028 | C++ | // >>> TEMPLATES
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using i32 = int32_t;
using i64 = int64_t;
#define int ll
#define double ld
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define rep1(i,n) for (int i = 1; i <= (int)(n); i++)
#define repR(i,n) for (int i =... | a.cc: In instantiation of 'constexpr ModInt garner(const P&, const Q&, const R&) [with ModInt = modint<1000000007>; P = modint<167772161>; Q = modint<469762049>; R = modint<1224736769>]':
a.cc:260:42: required from 'std::vector<_Tp> conv(const std::vector<_Tp>&, const std::vector<_Tp>&) [with ModInt = modint<10000000... |
s665143747 | p04028 | C++ | // >>> TEMPLATES
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using i32 = int32_t;
using i64 = int64_t;
#define int ll
#define double ld
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define rep1(i,n) for (int i = 1; i <= (int)(n); i++)
#define repR(i,n) for (int i =... | a.cc: In instantiation of 'static std::vector<_Tp> NTT<ModInt, g>::conv(const std::vector<T>&, const std::vector<T>&) [with T = modint<1000000007>; ModInt = modint<167772161>; long int g = 3]':
a.cc:255:24: required from 'std::vector<_Tp> conv(const std::vector<_Tp>&, const std::vector<_Tp>&) [with ModInt = modint<10... |
s492654229 | p04028 | C++ | /**
* author: otera
**/
#include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bi... | a.cc: In function 'void solve()':
a.cc:120:57: error: no matching function for call to 'std::vector<std::vector<Fp<1000000007> > >::vector(int, std::vector<int>)'
120 | vector<vector<mint>> dp(n + 1, vector<int>(m + 1, 0));
| ^
In file included from /u... |
s320869763 | p04028 | C++ | #include<iostream>
using namespace std;
const int N = 5005, mod = 1e9 + 7;
int n, f[N][N], m; char s[N];
int main() {
scanf("%d%s", &n, s + 1); m = strlen(s + 1);
f[0][0] = 1;
for (int i = 0; i < n; i++)
for (int j = 0; j <= i; j++) {
if (j) f[i + 1][j - 1] = (f[i + 1][j - 1] + f[i][j]) % mod;
else f[i +... | a.cc: In function 'int main()':
a.cc:6:39: error: 'strlen' was not declared in this scope
6 | scanf("%d%s", &n, s + 1); m = strlen(s + 1);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
... |
s129550650 | p04028 | C++ | #include<bits/stdc++.h>
using namespace std;
using Lint=long long;
template<int mod> class ModInt
{
private:
Lint val;
public:
Lint value(){ return val; }
ModInt(Lint x=0){ val=x%mod; }
ModInt pow(int n){
ModInt res(1),x(val);
while(n>0){ if(n&1) res*=x; x*=x; n>>=1; }
retu... | a.cc: In function 'int main()':
a.cc:38:23: error: no match for 'operator==' (operand types are 'mint' {aka 'ModInt<1000000007>'} and 'int')
38 | if(dp[i][j][k]==0) continue;
| ~~~~~~~~~~~^~~
| | |
| | int
| m... |
s362817500 | p04028 | C++ | # include <bits / stdc ++. h>
using namespace std ;
const int N = 5005 , mod = 1e9 + 7 ;
int n, f [N] [N], m; char s [N];
int main () {
freopen ( "pp.in" , "r" , stdin);
freopen ( "pp.out" , "w" , stdout);
scanf ( "% d% s" , & n, s + 1 ); m = strlen (s + 1 );
f [ 0 ] [ 0 ] = 1 ;
for ( int i = 0 ; i ... | a.cc:1:11: fatal error: bits / stdc ++. h: No such file or directory
1 | # include <bits / stdc ++. h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s442582114 | p04028 | Java | . | Main.java:1: error: class, interface, enum, or record expected
.
^
1 error
|
s544690497 | p04028 | C++ | #include <bits/stdc++.h>
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using long long = LL;
using namespace std;
LL p = 1000000007ll;
LL n,m;
map<LL,map<LL,map<LL,LL>>> memo;
LL solve(LL i,LL co,LL er)
{
if(i==n) {
if(co == m && er == 0) return 1;
else return 0;
}
if(memo[i][c... | a.cc:5:7: error: expected nested-name-specifier before 'long'
5 | using long long = LL;
| ^~~~
a.cc:7:1: error: 'LL' does not name a type
7 | LL p = 1000000007ll;
| ^~
a.cc:8:1: error: 'LL' does not name a type
8 | LL n,m;
| ^~
a.cc:10:5: error: 'LL' was not declared in this scope
... |
s090271625 | p04028 | C++ | #include <bits/stdc++.h>
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using LL = long long;
using namespace std;
LL p = 1000000007ll;
LL n,m;
map<LL,map<LL,map<LL,LL>>> memo;
LL solve(LL i,LL co,LL er)
{
if(i==n) {
if(co == m && er == 0) return 1;
else return 0;
}
if(memo[i][c... | a.cc: In function 'LL solve(LL, LL, LL)':
a.cc:20:31: error: no matching function for call to 'max(LL, int)'
20 | answer += solve(i+1, co, max(er-1, 0));
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/1... |
s039449480 | p04028 | C++ | #include <bits/stdc++.h>
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using long long = LL;
using namespace std;
LL p = 1000000007ll;
LL n,m;
map<LL,map<LL,map<LL,LL>>> memo;
LL solve(LL i,LL co,LL er)
{
if(i==n) {
if(co == m && er == 0) return 1;
else return 0;
}
if(memo[i][c... | a.cc:5:7: error: expected nested-name-specifier before 'long'
5 | using long long = LL;
| ^~~~
a.cc:7:1: error: 'LL' does not name a type
7 | LL p = 1000000007ll;
| ^~
a.cc:8:1: error: 'LL' does not name a type
8 | LL n,m;
| ^~
a.cc:10:5: error: 'LL' was not declared in this scope
... |
s915137957 | p04028 | C++ | #include <bits/stdc++.h>
typedef long long LL;
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using namespace std;
LL p = 1000000007ll;
LL n,m;
map<LL,map<LL,map<LL,LL>>> memo;
LL solve(LL i,LL co,LL er)
{
if(i==n) {
if(co == m && er == 0) return 1;
else return 0;
}
if(memo[i][c... | a.cc: In function 'LL solve(LL, LL, LL)':
a.cc:20:31: error: no matching function for call to 'max(LL, int)'
20 | answer += solve(i+1, co, max(er-1, 0));
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/1... |
s333274505 | p04028 | C++ | #include <bits/stdc++.h>
using namespace std;
template<int mod> struct ModInt {
using ll = long long;
int x;
template<class T>
ModInt(T a) {
x = a % mod;
if (x < 0) {
x += mod;
}
}
ModInt() : x(0) {}
inline ModInt& operator+=(const ModInt& rhs)
{
(*this) += rhs.x;
return *this;
}
template<class... | a.cc: In function 'int main()':
a.cc:191:23: error: 'N' was not declared in this scope
191 | for (int i = 1; i < N+1; i++) {
| ^
|
s166483874 | p04028 | C++ | #include<bits/stdc++.h>
#define fr(i,n) for(int i=0;i<(n);++i)
#define foor(i,a,b) for(int i=(a);i<=(b);++i)
#define rf(i,n) for(int i=(n);i--;)
#define roof(i,b,a) for(int i=(b);i>=(a);--i)
#define elsif else if
#define all(x) x.begin(),x.end()
#define Sort(x) sort(all(x))
#define Reverse(x) reverse(all(x))
#define PQ... | a.cc: In function 'int main()':
a.cc:102:20: error: 'S' was not declared in this scope
102 | print(d[N][S.size()]*inv(pow(2,S.size(),MD))%MD);
| ^
|
s912734244 | p04028 | C++ | #include<bits/stdc++.h>
using namespace std;
long long DP[5001][5001];
long long pow[5001];
int mod=1e9+7;
int main(){
int N;
string S;
cin>>N>>S;
int now=1;
for(int i=0;i<N+1;i++){
DP[0][i]=0;
pow[i]=now;
(now*=2)%=mod;
}
for(int i=1;i<N+1;i++){
(DP[i][0]=DP[i-1][1]+DP[i-1][0]);
for(i... | a.cc:4:19: error: 'long long int pow [5001]' redeclared as different kind of entity
4 | long long pow[5001];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-linux... |
s239712527 | p04028 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define mod 1000000007
typedef long long LL;
int n,m;
LL f[5005][5005]={1};
char s[5005];
int main()
{
scanf("%d",&m);
scanf("%s",s);
n=strlen(s);
for(int j=1;j<=m;j++)
for(int i=0;i<=m;i++)
{
if(i!=m)
f[i][j]+=2ll*f[i+1][j-1];
... | /tmp/ccbcq1MI.s: Assembler messages:
/tmp/ccbcq1MI.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccvMrLkS.o: 'No space left on device'
|
s818769177 | p04028 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define mod 1000000007
typedef long long LL;
int n,m;
LL f[5005][5005]={1};
char s[5005];
int main()
{
scanf("%d",&m);
scanf("%s",s);
n=strlen(s);
for(int j=1;j<=m;j++)
for(int i=0;i<=m;i++)
{
if(i!=m)
f[i][j]+=2ll*f[i+1][j-1];
... | /tmp/cc8LAHZ2.s: Assembler messages:
/tmp/cc8LAHZ2.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccNMwuYU.o: 'No space left on device'
|
s012683358 | p04028 | C++ | #include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define mod 1000000007
typedef long long LL;
int n,m;
LL f[5005][5005]={1};
char s[5005];
int main()
{
scanf("%d",&m);
scanf("%s",s);
n=strlen(s);
for(int j=1;j<=m;j++)
for(int i=0;i<=m;i++)
{
if(i!=m)
f[i][j]+... | /tmp/ccP4mus5.s: Assembler messages:
/tmp/ccP4mus5.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccTVS4rt.o: 'No space left on device'
|
s277218962 | p04028 | C++ | #include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define mod 1000000007
typedef long long LL;
int n,m;
LL f[5005][5005]={1};
char s[5005];
int main()
{
scanf("%d%s",&m,s);
n=strlen(s);
for(int j=1;j<=m;j++)
for(int i=0;i<=m;i++)
{
if(i!=m)
f[i][j]+=2ll*f[i+1][... | /tmp/ccvJZm1E.s: Assembler messages:
/tmp/ccvJZm1E.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccZmG3Vy.o: 'No space left on device'
|
s496971504 | p04028 | C++ | #include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
#define Max(_A,_B) (_A>_B?_A:_B)
int n,f[5005][5005],len;
int clz=1E9+7;
char ch[5005];
long long pw(long long a,int b){
long long nw=1;
while(b){
if(b&1){
nw=nw*a%clz;
}
a=a*a%clz;
b>>=1;
... | a.cc: In function 'void init()':
a.cc:35:17: error: 'ans' was not declared in this scope; did you mean 'anss'?
35 | printf("%d",ans);
| ^~~
| anss
|
s483407248 | p04028 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long
const long long mod=1e9+7;
ll pow(ll a, ll b, ll MOD)
{
ll x=1,y=a;
while(b > 0)
{
if(b%2 == 1)
{
x=(x*y);
if(x>MOD) x%=MOD;
}
y = (y*y);
if(y>MOD) y%=MOD;
b /= 2;
}
return x;
}
long long dp[5001][5001],n,l;
int main(){
cin... | a.cc: In function 'int main()':
a.cc:44:24: error: 'Pow' was not declared in this scope; did you mean 'pow'?
44 | cout<<dp[n][l]*Pow(2,mod-2)%mod;
| ^~~
| pow
|
s090415525 | p04028 | C++ | #include "bits/stdc++.h"
#define ll long long
#define rep2(i,a,b) for(int i=(a);i<=(b);++i)
#define rep(i,n) for(int i=0;i<n;i++)
#define pii pair<int,int>
#define ti3 tuple<int,int,int>
ll int MOD=1e9+7;
#define N 6000
using namespace std;
string alphabet("abcdefghijklmnopqrstuvwxyz");
ll int poww(ll int a,ll int b... | a.cc: In function 'long long int calc(long long int, long long int)':
a.cc:30:5: error: 'visited' was not declared in this scope
30 | visited[a][b]=1;
| ^~~~~~~
a.cc: At global scope:
a.cc:40:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
40 | main(){
| ^~~~
|
s310821136 | p04028 | C++ | #include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
long long a[5002][5002]={{1}},b[2][5002],i,j,m,n,z=1e9+7;char c[5001];
int main()
{
scanf("%lld%s",&n,c),m=strlen(c);
for(i=0;i<=n;i++)
for(j=0;j<=m;j++)
{
b[i&1][j]=(b[i&1][j]<<1)%z;
a[i][j]=(a[i][j]+b[i&1][j])%z;
if(!j)a[i+1][j]=(a[... | /tmp/cco3sW3H.s: Assembler messages:
/tmp/cco3sW3H.s: Fatal error: can't fill 256 bytes in section .data of /tmp/cccVeC2R.o: 'No space left on device'
/tmp/cco3sW3H.s: Fatal error: /tmp/cccVeC2R.o: No such file or directory
|
s102576391 | p04028 | C++ | #include<cstdint>
template<std::uint_fast32_t MODULO>
struct modint {
private:
using uint32 = std::uint_fast32_t;
using uint64 = std::uint_fast64_t;
public:
uint32 a;
modint() :a(0) {}
modint(const std::int_fast64_t &x) :a(set(x%MODULO + MODULO)) {}
static uint32 set(const uint32 &x) { return(x<MODULO) ? x : x ... | a.cc: In function 'int main()':
a.cc:47:14: error: 'string' is not a member of 'std'
47 | std::string s;
| ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
1 | #include<cstdint>
+++ |+#include <string>
2 ... |
s515192615 | p04028 | C++ | #include <iostream>
#include <algorithm>
#include <array>
#include <cstdint>
#include <climits>
#include <functional>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string>
#include <time.h>
#include <type_traits>
#include <utility>
#include <vector>
usi... | a.cc:28:7: error: conflicting declaration 'using uint = using uint32 = uint_fast32_t'
28 | using uint = uint32;
| ^~~~
In file included from /usr/include/stdlib.h:514,
from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_conversions.h:43,
... |
s494385592 | p04028 | C++ | #pragma region include
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <sstream>
#include <algorithm>
#include <iterator>
#include <cmath>
#include <complex>
#include <string>
#include <cstring>
#include <vector>
#include <tuple>
#include <bitset>
#include <queue>
#include <complex>
#include <set>... | a.cc: In function 'void solve()':
a.cc:80:32: error: 'powMod' was not declared in this scope
80 | LL MOD_2_size = powMod(powMod(2,MOD-2),size);
| ^~~~~~
a.cc:80:25: error: 'powMod' was not declared in this scope
80 | LL MOD_2_size = powMod(powMod(2,MOD-2),size)... |
s324311607 | p04028 | C++ |
#include <iostream>
#include <string>
using namespace std;
int n;
int memo[5001][10001];
bool tag[5001][10001];
const int mod = 1000000007;
const int invtwo = 500000004;
int dp(int i, int j)//i=押したキー回数 j=現在のカーソル位置
{
if (i < j)return 0;
if (i == 0)
{
if (j == 0)return 1;
return 0;
}
if (tag[i][j])return memo[... | a.cc: In function 'int main()':
a.cc:41:9: error: 'memset' was not declared in this scope
41 | memset(tag, false, sizeof(tag));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <iostream>
+++ |+#includ... |
s380123775 | p04028 | C++ | #include <iostream>
#include <string>
using namespace std;
const int MOD = 1000000007;
const int MAX_N = 5000;
long long dp[MAX_N+1][MAX_N+1]={1};
int main() {
int N;
string s;
cin >> N >> s;
for(int i=0;i<N;i++) {
dp[i+1][0] = dp[i][0];
dp[i+1][1] = dp[i][0];
for(int j=1;j<=i;j++) {
dp[i+1][j+1] = dp[i][j... | /tmp/ccaJ8oF6.s: Assembler messages:
/tmp/ccaJ8oF6.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccTAtWFU.o: 'No space left on device'
/tmp/ccaJ8oF6.s: Fatal error: /tmp/ccTAtWFU.o: No such file or directory
|
s034608176 | p04028 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,n) for(int i = 0; i < (n); i++)
#define sz(c) ((int)c.size())
#define ten(n) ((int)1e##n)
using ll = long long;
template<typename ...> static inline int getchar_unlocked(void) { return getchar(); }
template<typename ...> static inline void putchar_unlocked(i... | a.cc: In function 'int main()':
a.cc:116:9: error: 'solve2' was not declared in this scope; did you mean 'solve'?
116 | solve2(n, m);
| ^~~~~~
| solve
|
s761780078 | p04028 | C++ | #include <string>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
const int mod = 1e9+7;
int add(int a, int b) { return (a+b)%mod; }
int sub(int a, int b) { return (a-b+mod)%mod; }
int mult(int a, int b) { return (long long) a*b%mod; }
int n;
string s;
int dp[5005][5005];
int main() {
ci... | a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:13:12: note: to match this '{'
13 | int main() {
| ^
|
s148386327 | p04028 | C++ | #include <string>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
const int mod = 1e9+7;
int add(int a, int b) { return (a+b)%mod; }
int sub(int a, int b) { return (a-b+mod)%mod; }
int mult(int a, int b) { return (long long) a*b%mod; }
int n;
string s;
int dp[5005][5005];
int main() {
ci... | a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:13:12: note: to match this '{'
13 | int main() {
| ^
|
s460789535 | p04029 | 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:34:1: error: 'p' does not name a type
34 | p
| ^
|
s393508397 | p04029 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
cin>>n;
int s=0;
for(int i=1;i<=n; i++) {
s+=i;}
cout<<s;
return 0;}
| a.cc: In function 'int main()':
a.cc:4:6: error: 'n' was not declared in this scope; did you mean 'yn'?
4 | cin>>n;
| ^
| yn
|
s288981560 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int souwa = N*(N+1)/2;
cout >> souwa >> endl;
} | a.cc: In function 'int main()':
a.cc:8:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
8 | cout >> souwa >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:8:6: note: candidat... |
s040169367 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int souwa = N*(N+1)/2;
cout >> int souwa >> endl;
} | a.cc: In function 'int main()':
a.cc:8:9: error: expected primary-expression before 'int'
8 | cout >> int souwa >> endl;
| ^~~
|
s292408987 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int souwa = N*(N+1)/2;
cout >> souwa >> endl;
} | a.cc: In function 'int main()':
a.cc:8:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
8 | cout >> souwa >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:8:6: note: candidat... |
s083992513 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int souwa = N*(N+1)/2
cout >> souwa >> endl;
} | a.cc: In function 'int main()':
a.cc:8:1: error: expected ',' or ';' before 'cout'
8 | cout >> souwa >> endl;
| ^~~~
|
s723939532 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout >> int N*(N+1)/2; >> endl;
} | a.cc: In function 'int main()':
a.cc:8:9: error: expected primary-expression before 'int'
8 | cout >> int N*(N+1)/2; >> endl;
| ^~~
a.cc:8:24: error: expected primary-expression before '>>' token
8 | cout >> int N*(N+1)/2; >> endl;
| ^~
|
s042091474 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout >> N*(N+1)/2 >> endl;
} | a.cc: In function 'int main()':
a.cc:8:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
8 | cout >> N*(N+1)/2 >> endl;
| ~~~~ ^~ ~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.... |
s937619134 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout >> N(N+1)/2 >> endl;
} | a.cc: In function 'int main()':
a.cc:8:10: error: 'N' cannot be used as a function
8 | cout >> N(N+1)/2 >> endl;
| ~^~~~~
|
s808949161 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int k=N(N+1)/2;
cout >> k >> endl;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'N' cannot be used as a function
7 | int k=N(N+1)/2;
| ~^~~~~
a.cc:9:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
9 | cout >> k >> endl;
| ~~~~ ^~ ~
| | |
|... |
s358677491 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int k=N(N+1)/2
cout >> k >> endl;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'N' cannot be used as a function
7 | int k=N(N+1)/2
| ~^~~~~
|
s205554841 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int s = 0;
for(int i=1; i<=n; i++){
s += i}
}
cout << s << endl; | a.cc: In function 'int main()':
a.cc:9:9: error: expected ';' before '}' token
9 | s += i}
| ^
| ;
a.cc: At global scope:
a.cc:11:1: error: 'cout' does not name a type
11 | cout << s << endl;
| ^~~~
|
s296599280 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
cout >> N*(N+1)/2 >> endl;
} | a.cc: In function 'int main()':
a.cc:8:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
8 | cout >> N*(N+1)/2 >> endl;
| ~~~~ ^~ ~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.... |
s194472973 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
number==N*(N+1)/2;
cout >> number >> endl;
} | a.cc: In function 'int main()':
a.cc:7:1: error: 'number' was not declared in this scope
7 | number==N*(N+1)/2;
| ^~~~~~
|
s584720224 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
number==1/2*N*(N+1);
cout >> number >> endl;
} | a.cc: In function 'int main()':
a.cc:7:1: error: 'number' was not declared in this scope
7 | number==1/2*N*(N+1);
| ^~~~~~
|
s665383990 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
number==1/2*N*(N+1)
cout >> number >> endl; | a.cc: In function 'int main()':
a.cc:7:1: error: 'number' was not declared in this scope
7 | number==1/2*N*(N+1)
| ^~~~~~
a.cc:8:24: error: expected '}' at end of input
8 | cout >> number >> endl;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^... |
s395509751 | p04029 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
scn(n);
cout<<(n*(n-1))/2<<endl;
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'scn' was not declared in this scope; did you mean 'sin'?
6 | scn(n);
| ^~~
| sin
|
s495591927 | p04029 | C++ | MZ��������������������@������������������������������������������ �!�L�!This program cannot be run in DOS mode.
$�������PE��L�,-Z_�������� �F���z���JI��������`����@����������������������J����r������ ���������������������������I�X ����������������������������������������������������������... | a.cc:1:5: error: stray '\3' in program
1 | MZ<U+FFFD><U+FFFD><U+0003><U+FFFD><U+FFFD><U+FFFD><U+0004><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD>@<U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFFD><U+FFF... |
s778990615 | p04029 | C++ | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << n(n+1)/2 << endl;
} | a.cc: In function 'int main()':
a.cc:7:12: error: 'n' cannot be used as a function
7 | cout << n(n+1)/2 << endl;
| ~^~~~~
|
s810081352 | p04029 | Java | import java.util.*;
import java.io.*;
public class Main{
public static void main(String `[]args){
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int [] arr = new int[n];
for(int i=... | Main.java:7: error: illegal character: '`'
public static void main(String `[]args){
^
1 error
|
s265608598 | p04029 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,c=0;
cin >> n;
for(i = 1; i <= n ; i++) c += i ;
cout << c;
}
| a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
7 | for(i = 1; i <= n ; i++) c += i ;
| ^
|
s545580492 | p04029 | C++ | #include<bits/stdc++.h>
#define ll long long int
#define vec vector<ll>
#define mat vector<vector<ll>>
using namespace std;
const ll mod=1000000007;
const ll inf=LONG_LONG_MAX;
ll dx4[4]={1,0,-1,0};
ll dy4[4]={0,-1,0,1};
ll dx8[8]={1,0,-1,1,-1,1,0,-1};
ll dy8[8]={1,1,1,0,0,-1,-1,-1};
int main(){
ll n;
cin << n*... | a.cc: In function 'int main()':
a.cc:18:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'long long int')
18 | cin << n*(n+1)/2 << endl;
| ~~~ ^~ ~~~~~~~~~
| | |
| | long long int
| std::istream {aka s... |
s005071195 | p04029 | C++ | #include<bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, a, b) for (int i =a; i < b; i++)
#define all(a) a.begin(), a.end()
#define PI 3.14159265359
static const int INF = 1e9+7;
typedef long long ll;
using namespace std;
int main()
{
string s;
cin>>s;
string st;
int n=s.le... | a.cc: In function 'int main()':
a.cc:27:24: error: no matching function for call to 'std::__cxx11::basic_string<char>::pop_back(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
27 | st.pop_back(s[i]);
| ~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/stri... |
s098209934 | p04029 | C++ | #include<bits/stdc++>h>
using namespace std;
int main(){
int n;
cin>>n;
int x=0;
for(int i=1;i<=n;i++){
x+=i;
}
cout<<x<<endl;
}
| a.cc:1:23: warning: extra tokens at end of #include directive
1 | #include<bits/stdc++>h>
| ^
a.cc:1:9: fatal error: bits/stdc++>: No such file or directory
1 | #include<bits/stdc++>h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s825332422 | p04029 | C++ | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << (n(n+1))/2 << endl;
} | a.cc: In function 'int main()':
a.cc:7:13: error: 'n' cannot be used as a function
7 | cout << (n(n+1))/2 << endl;
| ~^~~~~
|
s941234878 | p04029 | C++ | #include <iostream>
int main()
{
int num, sum = 0;
cin << num;
for(int i = 1; i <= num; i++)
{
sum += i;
}
cout << sum << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin << num;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to s... |
s983934450 | p04029 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
string s;
cin>>s;
vector<char> v;
for(char ch: s) {
if(ch != 'B')v.push_back(ch);
else if(v.size() > 1) v.pop_back();
} | a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:8:1: note: to match this '{'
8 | {
| ^
|
s214609230 | p04029 | C++ | #include <stdio.h>
#include <string.h>
int main(){
char a[11];
scanf("%s",a);
for(int i=0;i<strlen(a);i++){
int db=0;
if(a[i]=='B'&&i!=0){
int j=i;
int k=1;
while(a[j]=='B'){
a[i-k]='B';
k++;
j++
}
db++
}
}
for(int i=0;i<strlen(a);i++){
if(s[i]!='B'){
printf("%c",s[i])
}
}... | a.cc: In function 'int main()':
a.cc:15:36: error: expected ';' before '}' token
15 | j++
| ^
| ;
16 | }
| ~
a.cc:17:29: error: expecte... |
s945430239 | p04029 | C++ | #include <stdio.h> int main() { int N; scanf("%d", &N); printf("%d\n", N*(N+1)/2); return 0;} | a.cc:1:20: warning: extra tokens at end of #include directive
1 | #include <stdio.h> int main() { int N; scanf("%d", &N); printf("%d\n", N*(N+1)/2); return 0;}
| ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefine... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.