submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s346678665 | p04045 | C++ | #include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const array<pair<int,int>,4> fd{make_pair(1,0),make_pair(-1,0),make_pair(... | a.cc: In function 'int main()':
a.cc:22:30: error: expected ';' before '}' token
22 | a.push_back(s[j] - '0')
| ^
| ;
23 | }
| ~
|
s256600829 | p04045 | C++ | #include<bits/stdc++.h>
using namespace std;
int d[10]= {0};
bool ok(int x)
{
int o;
while(x)
{
o=x%10;
if(d[o])
return false;
x/=10;
}
return true;
}
int main()
{
int n,k,x;
scanf("%d%d",&n,&k);
for(int i=0; i<k; i++)
{
scanf("%d",&x);
... | a.cc: In function 'int main()':
a.cc:23:13: error: expected ';' before numeric constant
23 | d[x]10000=1;
| ^~~~~
| ;
|
s799611547 | p04045 | C++ | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
ll #define long long #define PI acos (- 1.0... | a.cc:16:4: error: stray '#' in program
16 | ll #define long long #define PI acos (- 1.0 ) #define FOR (I, A, B) for ( int I = (A); I <(B); ++ I)
| ^
a.cc:16:31: error: stray '#' in program
16 | ll #define long long #define PI acos (- 1.0 ) #define FOR (I, A, B) for ( int I = (A); I <(B)... |
s622992504 | p04045 | C++ | #include <iostream>
#include <algorithm>
#include <string >
using namespace std;
static int D[10];
bool check(int n){
int num=n;
while(n){
if(D[n%10]==1) return true;
n/=10;
}
cout<<num<<endl;
return false;
}
int main()
{
int N,K;
int num;
cin>>N>>K;
for(int i=1;i<=K;i++){
int num;
cin>>num;
D[num]=... | a.cc:3:10: fatal error: string : No such file or directory
3 | #include <string >
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s774927111 | p04045 | C++ | #include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
int n,k,a;
int s[7],s1[7];
int num[12];
int main()
{
scanf("%d%d",&n,&k);
for(int i=1;i<=k;i++)
{
scanf("%d",&a);
num[a]=1;
}
if(n==0)
{
for(int l=0;l<=9;l++)
if(num[l]==0)
{
printf("%d",l);
return 0;
}0
}
int len=... | a.cc: In function 'int main()':
a.cc:23:27: error: expected ';' before '}' token
23 | }0
| ^
| ;
24 | }
| ~
|
s558914670 | p04045 | C++ | #include <bits/stdc++.h>
using namespace std;
map <int,int> m;
int main()
{
int n,k,x;
cin >> n >> k;
for(int i=0;i<k;i++)
{
cin >> x;
m[x]++;
}
while(true)
{
int temp = n;
bool flag = true;
while(temp)
{
if(m[temp%10] == 1)
... | a.cc: In function 'int main()':
a.cc:40:5: error: 'cour' was not declared in this scope
40 | cour << n << endl;
| ^~~~
|
s503063678 | p04045 | C++ | #include <bits/stdc++.h>
using namespace std;
map <int,int> m;
int main()
{
int n,k;
cin >> n >> k;
for(int i=0;i<k;i++)
{
cin >> x;
m[x]++;
}
while(true)
{
int temp = n;
bool flag = true;
while(temp)
{
if(m[temp%10] == 1)
... | a.cc: In function 'int main()':
a.cc:14:16: error: 'x' was not declared in this scope
14 | cin >> x;
| ^
a.cc:40:5: error: 'cour' was not declared in this scope
40 | cour << n << endl;
| ^~~~
|
s241283581 | p04045 | C++ | def main():
N, K = map(int, input().split())
D = list(input().split())
i = 0
while True:
S = str(N)
f = True
for s in S:
if s in D:
f = False
break
if f:
break
N += 1
print(N)
if __name__ == "__main... | a.cc:1:1: error: 'def' does not name a type
1 | def main():
| ^~~
|
s197066049 | p04045 | C++ | #include <bits/stdc++.h>
using namespace std;
#define forx(i, a, b) for (int i = (a); i < (b); i++)
#define rep(j, n) for (int j = 0; j < (n); j++)
typedef long long ll;
vector<bool>p(10);
int judge(int n){
while(n!=0){
int b=n%10;
rep(i,10){
if(b==a[i])return false;
}
n/=10;
}
return t... | a.cc: In function 'int judge(int)':
a.cc:14:13: error: 'a' was not declared in this scope
14 | if(b==a[i])return false;
| ^
|
s653163713 | p04045 | C++ | #include <iostream>
using namespace std;
int main()
{
int N, K;
cin >> N >> K;
int D[10];
for (int i = 0; i < K; i++) {
cin >> D[i];
}
int n = N;
while (1) {
int a[5];
int nc = n;
bool flag = true;
for(int i = 0; i < 5; i++) {
a[i] = nc % 10;
nc -= a[i];
nc /= 10;
... | a.cc: In function 'int main()':
a.cc:51:2: error: expected '}' at end of input
51 | }
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s067401574 | p04045 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
cin >> n >> k;
for(int i = 0; i < k ; i++)
{
cin >> q;
dislikes[q] = 1;
}
while(true)
{
int prev_n = n, cnt = 0;
bool ok = false;
s = toStr(n);
for(int i = s.size() - 1; i >= 0; i--)
... | a.cc: In function 'int main()':
a.cc:7:12: error: 'n' was not declared in this scope; did you mean 'yn'?
7 | cin >> n >> k;
| ^
| yn
a.cc:7:17: error: 'k' was not declared in this scope
7 | cin >> n >> k;
| ^
a.cc:10:16: error: 'q' was not declared... |
s792807231 | p04045 | C++ | #include<iostream>
using namespace std;
int main(){
int N,K;
int answer=0;
cin>>N>>K;
int D[K],R[5]={0};
for(int i=0;i<K;i++)cin>>D[i];
for(int ans=N;ans<=10*N;ans++){
bool flag=true;
int ans_=ans;
while(true){
int part=ans_%10;ans_/=10;
for(int j=0;j<5;j++){if(part==D[j])flag=false;... | a.cc: In function 'int main()':
a.cc:19:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
19 | cout<<ans<<endl;
| ^~~
| abs
|
s351570218 | p04045 | C++ | #include<iostream>
using namespace std;
int main(){
int N,K;
cin>>N>>K;
int D[K],R[5]={0};
for(int i=0;i<K;i++)cin>>D[i];
for(int ans=N;ans<=10*N;ans++){
bool flag=true;
int ans_=ans;
while(true){
int part=ans_%10;ans_/=10;
for(int j=0;j<5;j++){if(part==D[j])flag=false;}
if(ans_=... | a.cc: In function 'int main()':
a.cc:18:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
18 | cout<<ans<<endl;
| ^~~
| abs
|
s433308074 | p04045 | C++ | #include<iostream>
using namespace std;
int main(){
int N,K;
cin>>N>>K;
int D[K],R[5]={0};
for(int i=0;i<K;i++)cin>>D[i];
for(int ans=N;ans<=10*N;ans++){
bool flag=true;
int ans_=ans;
while(true){
int part=ans_%10;ans_/=10;
for(int j=0;j<5;j++){if(part==D[j])flag=false};
if(ans_=... | a.cc: In function 'int main()':
a.cc:13:52: error: expected ';' before '}' token
13 | for(int j=0;j<5;j++){if(part==D[j])flag=false};
| ^
| ;
a.cc:18:9: error: 'ans' was not declared in this scope;... |
s845466601 | p04045 | C++ | #include <iostream>
using namespace std;
int D[10];
inline bool ok(n) {
while (n) {
if (D[n%10]==0) {
n/=10;
} else {
return false;
}
}
return true;
}
int main() {
cin.tie(0);
std::ios::sync_with_stdio(false);
int N,K;
cin>>N>>K;
for (int i=0; i<K; i++) {
int d;
cin>>d;... | a.cc:6:16: error: 'n' was not declared in this scope
6 | inline bool ok(n) {
| ^
a.cc: In function 'int main()':
a.cc:26:13: error: 'ok' cannot be used as a function
26 | while (!ok(N)) {
| ~~^~~
|
s526758258 | p04045 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int N,K;
cin>>N>>K;
int no[K];
for(int i=1;i<K;i++)cin>>no[K];
int digit[4];
int n=N;
for(int i=0;i<4;i++){digit[i]=n%10;n/=10;}
for(int i=0;i<4;i++){
for(j=0;j<K;j++){
... | a.cc: In function 'int main()':
a.cc:13:13: error: 'j' was not declared in this scope
13 | for(j=0;j<K;j++){
| ^
|
s631987962 | p04045 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int N,K;
cin>>N>>K;
int no[K];
for(int i=1;i<K;i++)cin>>okies[K];
int digit[4];
int n=N;
for(int i=0;i<4;i++){digit[i]=n%10;n/=10;}
for(int i=0;i<4;i++){
for(j=0;j<K;j++){
if(digit[i]==no[j]&&digit[i]!=9)digit[i]++;
... | a.cc: In function 'int main()':
a.cc:8:28: error: 'okies' was not declared in this scope
8 | for(int i=1;i<K;i++)cin>>okies[K];
| ^~~~~
a.cc:13:9: error: 'j' was not declared in this scope
13 | for(j=0;j<K;j++){
| ^
|
s436315072 | p04045 | C++ | N = int(input())
num = list(map(int,input().split()))
sumN = 0
for i in range(N):
sumN += num[i]
ave = sumN//N
minN = 10**15
for j in range(-1,2):
work = 0
for k in range(N):
work += pow(ave+j-num[k],2)
minN = min(minN,work)
print(minN) | a.cc:1:1: error: 'N' does not name a type
1 | N = int(input())
| ^
|
s137781343 | p04045 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int N,K;
cin>>N>>K;
int tar[5];
for(int i=0;i<5;i++){
tar[i]=N%10;
N/=10;
if(N==0)break;
}
int non[K];
for(int i=0;i<K;i++)
cin>>non[K];
for(int i=0;i<5;i++){
for(int j=0;j<9-K;j++){
if(tar[i]==non[j])tar[i... | a.cc: In function 'int main()':
a.cc:22:9: error: 'ns' was not declared in this scope; did you mean 'ans'?
22 | cout<<ns<<endl;
| ^~
| ans
|
s238094744 | p04045 | Java | import java.io.*;
import java.util.*;
public class Beg42ProbC {
static int MOD = 1000000007;
static double EPS = 1e-9;
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(in.readLi... | Main.java:4: error: class Beg42ProbC is public, should be declared in a file named Beg42ProbC.java
public class Beg42ProbC {
^
1 error
|
s475526508 | p04045 | C++ | b | a.cc:1:1: error: 'b' does not name a type
1 | b
| ^
|
s012513239 | p04045 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<bool> ban(10, false);
for(int i=0; i<K; ++i) {
int b;
cin >> b;
ban[b] = true;
}
for(int i=N; ; ++i) {
string s = to_string(i);
bo... | a.cc: In function 'int main()':
a.cc:9:5: error: 'vector' was not declared in this scope
9 | vector<bool> ban(10, false);
| ^~~~~~
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... |
s575803758 | p04045 | C++ | #include<stdio.h>
int n;bool f[10];
bool ok(int x){
while(x){
if(f[x%10])return false;
x/=10;
}
return true;
}
int main(){
int k,x;
for(scanf("%d%d",&n,&k); k--;){
scanf("%d",&x);
f[x] = true;
}
while(!ok(n))n++;
printf("%d\n",n);
return 0; | a.cc: In function 'int main()':
a.cc:18:18: error: expected '}' at end of input
18 | return 0;
| ^
a.cc:10:11: note: to match this '{'
10 | int main(){
| ^
|
s241771729 | p04045 | C++ | //#include <bits/stdc++.h>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <map>
#include <stack>
#include <bitset>
#include <array>
#include <set>
#include <string>
#include <iterator>
#include <algorithm>
#include <numeric>
#include <ios>
#include <sstream>
#include <iostream>
#include ... | a.cc: In function 'int main()':
a.cc:71:16: error: 'log10' was not declared in this scope
71 | rep(i,(int)log10(n)+1){
| ^~~~~
a.cc:58:32: note: in definition of macro 'rep'
58 | #define rep(i,n) for(int i=0;i<n;i++)
| ^
a.cc:72:23: error: 'pow' was no... |
s111959552 | p04045 | C++ | However, as mentioned before, she is very particular about numbers. When she hands money to the cashier, the decimal notation of the amount must not contain any digits that she dislikes. Under this condition, she will hand the minimum amount of money.
| a.cc:1:1: error: 'However' does not name a type
1 | However, as mentioned before, she is very particular about numbers. When she hands money to the cashier, the decimal notation of the amount must not contain any digits that she dislikes. Under this condition, she will hand the minimum amount of money.
| ^~~~... |
s203920150 | p04045 | C++ | #include <iostream>
#include <algorithm>
#include <string.h>
using namespace sdtd;
int i,j,k,n;
bool dislike[10];
bool cek(int x)
{
while (x>0)
{
int buntut=x%10;
if (dislike[buntut])
return false;
x/=10;
}
return true;
}
int main()
{
memset(dislike,0,sizeof(dislike));
cin>>n>>k;
for (i=1;i<=k;i++)
{... | a.cc:4:17: error: 'sdtd' is not a namespace-name
4 | using namespace sdtd;
| ^~~~
a.cc: In function 'int main()':
a.cc:23:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
23 | cin>>n>>k;
| ^~~
| std::cin
In file included from a.cc:... |
s600899493 | p04045 | C++ | #include <iostream>
#include <algorithm>
#include <string.h>
int i,j,k,n;
bool dislike[10];
bool cek(int x)
{
while (x>0)
{
int buntut=x%10;
if (dislike[buntut])
return false;
x/=10;
}
return true;
}
int main()
{
memset(dislike,0,sizeof(dislike));
cin>>n>>k;
for (i=1;i<=k;i++)
{
cin>>j;
dislike[... | a.cc: In function 'int main()':
a.cc:23:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
23 | cin>>n>>k;
| ^~~
| 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; ... |
s317818320 | p04045 | C++ | import java.util.*;
// ABC 42-C
// http://abc042.contest.atcoder.jp/tasks/arc058_a
public class Main {
public static void main (String[] args) throws java.lang.Exception {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int k = in.nextInt();
HashMap<Integer, Integer> avoid = ne... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
6 | public class Main {
| ^~~~~~
|
s500324501 | p04045 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
ArrayList<Integer> dislike = new ArrayList<Integer>();
for(int i = 0; i < K; i++) {
dislike.add(sc.nextInt());
}
int ans ... | Main.java:17: error: incompatible types: char cannot be converted to String
int d = Integer.parseInt(s.charAt(i));
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
|
s428478667 | p04045 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
ArrayList<Integer> dislike = new ArrayList<Integer>();
for(int i = 0; i < K; i++) {
dislike.add(sc.nextInt());
}
ArrayLis... | Main.java:68: error: cannot find symbol
if(digit.get(i) < like.get(j)) {
^
symbol: variable i
location: class Main
1 error
|
s412927946 | p04045 | C++ | #include <stdio.h>
#include <cstdlib>
#include <algorithm>
int N, K, D[11];
char temp[112345];
bool match_flag = false;
int ans;
int GetDigit(int num)
{
int res = 0;
while (num != 0)
{
num /= 10;
++res;
}
return res;
}
int main(void)
{
scanf("%d%d", &N, &K);
for (int i = 0; i < K; ++i) { scanf("%d", &D... | a.cc: In function 'int main()':
a.cc:28:17: error: 'itoa' was not declared in this scope
28 | itoa(i, temp, 10);
| ^~~~
|
s945846183 | p04045 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <algorithm>
int N, K, D[11];
char temp[112345];
bool match_flag = false;
int ans;
int GetDigit(int num)
{
int res = 0;
while (num != 0)
{
num /= 10;
++res;
}
return res;
}
int main(void)
{
scanf("%d%d", &N, &K);
for (int i = 0; i < K; ++i) { scanf("%d", &... | a.cc: In function 'int main()':
a.cc:28:17: error: 'itoa' was not declared in this scope
28 | itoa(i, temp, 10);
| ^~~~
|
s856066194 | p04045 | C++ | #include <stdio.h>
#include <algorithm>
int N, K, D[11];
char temp[112345];
bool match_flag = false;
int ans;
int GetDigit(int num)
{
int res = 0;
while (num != 0)
{
num /= 10;
++res;
}
return res;
}
int main(void)
{
scanf("%d%d", &N, &K);
for (int i = 0; i < K; ++i) { scanf("%d", &D[i]); }
for (int i =... | a.cc: In function 'int main()':
a.cc:27:17: error: 'itoa' was not declared in this scope
27 | itoa(i, temp, 10);
| ^~~~
|
s850504028 | p04045 | C++ | #include <stdio.h>
#include <algorithm>
int N, K, D[11];
char temp[112345];
bool match_flag = false;
int ans;
int GetDigit(int num)
{
int res = 0;
while (num != 0)
{
num /= 10;
++res;
}
return res;
}
int main(void)
{
scanf("%d%d", &N, &K);
for (int i = 0; i < K; ++i) { scanf("%d", &D[i]); }
for (int i =... | a.cc: In function 'int main()':
a.cc:27:17: error: 'itoa' was not declared in this scope
27 | itoa(i, temp, 10);
| ^~~~
|
s006235748 | p04045 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
int Upper_Num(int num, vector<int> n_d){
for (int i = 0; i < n_d.size(); ++i){
if (n_d[i] > num)return n_d[i];
}
return -1;
}
int main(){
string N;
int K;
cin >> N >> K;
vector<int> D(K);
for (int i = 0; i < K; ++i){
cin >> D[i];
}... | a.cc: In function 'int main()':
a.cc:24:25: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
24 | if (find(D.begin(), D.end(), i) == D.end()){
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/... |
s256751269 | p04045 | C++ | #include <stdio.h>
#include <algorithm>
int N, K, D[11];
char buf[7];
bool break_flag = false;
int ans;
int my_atoi(char c)
{
switch (c)
{
case '1':
return 1;
case '2':
return 2;
case '3':
return 3;
case '4':
return 4;
case '5':
return 5;
case '6':
return 6;
case '7':
return 7;
case '8':
ret... | a.cc: In function 'int main()':
a.cc:42:37: error: 'strlen' was not declared in this scope
42 | for (int j = 0; j < strlen(buf); ++j)
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
... |
s641053508 | p04045 | C++ | #include <stdio.h>
#include <algorithm>
int N, K, D[11];
char buf[7];
int ans;
int my_atoi(char c)
{
switch (c)
{
case '1':
return 1;
case '2':
return 2;
case '3':
return 3;
case '4':
return 4;
case '5':
return 5;
case '6':
return 6;
case '7':
return 7;
case '8':
return 8;
case '9':
retur... | a.cc: In function 'int main()':
a.cc:41:37: error: 'strlen' was not declared in this scope
41 | for (int j = 0; j < strlen(buf); ++j)
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
... |
s808590691 | p04045 | C++ | #include <stdio.h>
#include <algorithm>
int N, K, D[11];
char buf[7];
int ans;
int my_atoi(char c)
{
switch (c)
{
case '1':
return 1;
case '2':
return 2;
case '3':
return 3;
case '4':
return 4;
case '5':
return 5;
case '6':
return 6;
case '7':
return 7;
case '8':
return 8;
case '9':
retur... | a.cc: In function 'int main()':
a.cc:40:17: error: 'itoa' was not declared in this scope
40 | itoa(i, buf, 10);
| ^~~~
a.cc:41:37: error: 'strlen' was not declared in this scope
41 | for (int j = 0; j < strlen(buf); ++j)
| ... |
s122353313 | p04045 | Java | import java.util.Scanner;
import java.util.LinkedList;
public class ABC042C {
public static void main(String[] args) {
IrohasObsession iroha = new IrohasObsession();
iroha.run();
}
}
class IrohasObsession {
int N;
int K;
int[] dislikeNums;
IrohasObsession() {
//input
Scanner cin = new Scanner(System... | Main.java:4: error: class ABC042C is public, should be declared in a file named ABC042C.java
public class ABC042C {
^
1 error
|
s905841141 | p04045 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
// 入力
int N, K; // N:購入金額, K:嫌いな数字の個数
cin >> N >> K;
bool num[10] = {false};
int tmp;
for (int i=0; i<K; i++) {
cin >> tmp;
num[tmp] = true;
}
bool able[10000] = {false};
string n;
for (int i=1; i<=10000; i++) {
n... | a.cc: In function 'int main()':
a.cc:32:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
32 | cout << ans << endl;
| ^~~
| abs
|
s024442889 | p04045 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Arrays;
public class Main {
private static Scanner sc;
public static void main(String[] args) {
Main instance ... | Main.java:39: error: incompatible types: char cannot be converted to String
int index = Integer.parseInt(number.charAt(0));
^
Main.java:71: warning: [removal] finalize() in Object has been deprecated and marked for removal
protected void fina... |
s652490176 | p04045 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Arrays;
public class Main {
private static Scanner sc;
public static void main(String[] args) {
Main instance ... | Main.java:36: error: int cannot be dereferenced
for (int j = 0; j < n.length(); j++) {
^
Main.java:37: error: int cannot be dereferenced
String number = String.valueOf(n.charAt(j));
^
Main.java:69: warning: [rem... |
s529112607 | p04045 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Arrays;
public class Main {
private static Scanner sc;
public static void main(String[] args) {
Main instance ... | Main.java:34: error: cannot find symbol
String number = String.valueOf(n.charAt(i));
^
symbol: variable i
location: class Main
Main.java:34: error: int cannot be dereferenced
String number = String.valueOf(n.charAt(i));
... |
s405095402 | p04045 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Arrays;
public class Main {
private static Scanner sc;
public static void main(String[] args) {
Main instance ... | Main.java:40: error: cannot find symbol
for (int j = 0; j < numbers.length(); j++) {
^
symbol: method length()
location: variable numbers of type List<Integer>
Main.java:68: warning: [removal] finalize() in Object has been deprecated and marked for removal
... |
s191410134 | p04045 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Arrays;
public class Main {
private static Scanner sc;
public static void main(String[] args) {
Main instance ... | Main.java:28: error: cannot find symbol
if (numbers(i) == d) {
^
symbol: method numbers(int)
location: class Main
Main.java:46: error: cannot find symbol
System.out.println(Intger.parseInt(String.join("", answerArray)));
^
symbol: vari... |
s059335603 | p04045 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Arrays;
public class Main {
private static Scanner sc;
public static void main(String[] args) {
Main instance ... | Main.java:46: error: ')' or ',' expected
System.out.println(Intger.parseInt(String.join("", answerArray));
^
1 error
|
s220608385 | p04045 | C | #include <iostream>
#include <vector>
int main(void)
{
int n;
int k;
std::cin >> n >> k;
auto ds = std::vector<int>(k);
for (int i = 0; i < k; i++) {
std::cin >> ds[i];
}
int result = n;
while (true) {
auto s = std::to_string(result);
for (auto &&c : s) {
for (auto &&d : ds) {
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s924842974 | p04045 | Java | import java.util.Scanner;
public class irohaDigit {
public static void main(String[] args)
{
int N;
int D;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
D = sc.nextInt();
int d[] = new int[10];
for(int i=0;i<D;i++)
{
d[sc.nextInt()]=1;
}
int sum=0;
int start9= 0;
int maxD = String.... | Main.java:2: error: class irohaDigit is public, should be declared in a file named irohaDigit.java
public class irohaDigit {
^
1 error
|
s163252875 | p04045 | Java | import java.util.Scanner;
import java.util.Arrays;
public class irohaDigit {
public static void main(String[] args)
{
int N;
int D;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
D = sc.nextInt();
int d[] = new int[10];
for(int i=0;i<D;i++)
{
d[sc.nextInt()]=1;
}
int sum=0;
int start9... | Main.java:3: error: class irohaDigit is public, should be declared in a file named irohaDigit.java
public class irohaDigit {
^
1 error
|
s936850011 | p04045 | C++ | #include <iostream>
#include <cmath>
#include <algorithm>
#include <stdio.h>
#include <string>
#include <string.h>
#include <stdlib.h>
#include <sstream>
#include <vector>
#include <map>
using namespace std;
const int N = 10000;
int arr[N];
bool func(string str, int *arr, int k);
int main()
{
string str;
int n, ... | a.cc: In function 'bool func(std::string, int*, int)':
a.cc:50:22: error: expected '}' at end of input
50 | return false;
| ^
a.cc:43:1: note: to match this '{'
43 | {
| ^
|
s844518153 | p04045 | C++ | include <iostream>
using namespace std;
int main(){
int n,k,ans;
int D[10];
cin >> n >> k;
for(int i=0;i < k;i++){
cin >> D[i];
}
int count = 1,num,flag=1,old_ans;
while(1){
ans = n*count;
old_ans = ans;
flag = 1;
while(old_ans > 0){
nu... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
9 | cin >> n >> k;
| ^~~
a.cc:37:5: error: 'cout' was not declared in this scope; did you mean 'count'?
37 | cout << n... |
s653454197 | p04045 | C++ | int minBigger(int i,string& N,string& ans,set<char>& avlb){
while (i >= 0){
for (auto& el : avlb){
if (el > N[i]){
ans[i] = el;
return i;
}
}
i--;
}
}
int main()
{
set<char> avlb = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
int K;
string N;
cin >> N >> K;
for (int i = 0; i < K; ++i... | a.cc:1:21: error: 'string' has not been declared
1 | int minBigger(int i,string& N,string& ans,set<char>& avlb){
| ^~~~~~
a.cc:1:31: error: 'string' has not been declared
1 | int minBigger(int i,string& N,string& ans,set<char>& avlb){
| ^~~~~~
a.cc:1... |
s305455926 | p04045 | C++ | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int amount = sc.nextInt();
int number = sc.nextInt();
boolean [] discard = new boolean[10];
for(int i = 0; i < number; i ++) {
discard[sc.nextInt()] = true;
}
int result = 0;
in... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s765887499 | p04045 | C | #include <stdio.h>
#include <stdlib.h>
#include <limits.h>
int int_sort( const void * a , const void * b ) {
/* 引数はvoid*型と規定されているのでint型にcastする */
if( *( int * )a < *( int * )b ) {
return -1;
}
else
if( *( int * )a == *( int * )b ) {
return 0;
}
return 1;
}
void delnumber(int K[], const int D_k[]... | main.c: In function 'makenumber':
main.c:33:9: error: expected expression before ')' token
33 | while()
| ^
|
s853020058 | p04045 | Java | import java.util.Scanner;
/**
* Created by wild on 2016/07/23.
*/
public class Main {
public static void main(String[] args) {
//入力
Scanner scan = new Scanner(System.in);
String[] tmpstr = scan.next().split("");
int[] money = new int[5];
int tmpcnt = 0;
for (int i ... | Main.java:68: error: reached end of file while parsing
}
^
1 error
|
s607746126 | p04045 | C++ | #include <iostream>
#include <vector>
using namespace std;
bool can_pay(int x, vector<int> ds) {
for ( ; x > 0; x /= 10) {
int digit = x % 10;
if (find(begin(ds), end(ds), digit) != end(ds)) {
return false;
}
}
return true;
}
int main() {
int n, k;
cin >> n >> k... | a.cc: In function 'bool can_pay(int, std::vector<int>)':
a.cc:8:17: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
8 | if (find(begin(ds), end(ds), digit) != end(ds)) {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /us... |
s729678512 | p04045 | Java | import java.util.ArrayList;
import java.util.Scanner;
/**
* Created by wild on 2016/07/23.
*/
public class C {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String[] tmpmoney = scan.next().split("");
int[] money = new int[tmpmoney.length];
for (in... | Main.java:7: error: class C is public, should be declared in a file named C.java
public class C {
^
1 error
|
s722050588 | p04045 | C++ | #include <iostream>
using namespace std;
int main(){
int n,k;
bool arr[10] = {};
cin >> n >> k;
while(k--){
int d;
cin >> d;
arr[d] = true;
}
for(int i = n;i < 10000;i++){
int tmp = i;
bool f = true;
while(tmp){
if(arr[x % 10]) f = false;
x /= 10;
}
if(f){
cout << i << endl;
return 0;... | a.cc: In function 'int main()':
a.cc:17:32: error: 'x' was not declared in this scope
17 | if(arr[x % 10]) f = false;
| ^
a.cc:18:25: error: 'x' was not declared in this scope
18 | x /= 10;
| ^
|
s710127811 | p04045 | C++ | #include <iostream>
#include <stdio.h> // printf,scanf
#include <stdlib.h>
#include <math.h>
#include <string>
#include <vector>
#include <algorithm> //sort,binarySearch
#include <functional>
#include <iomanip> // setprecision
#include <utility> // c+11 Array
#include <set>
#include <sstream>
#include <bits/... | a.cc: In function 'int main()':
a.cc:58:20: error: request for member 'size' in 'copy', which is of non-class type 'int'
58 | REP(i,copy.size())
| ^~~~
a.cc:15:37: note: in definition of macro 'FOR'
15 | #define FOR(i,a,b) for(int i=(a);i<(b);++i)
| ... |
s318854170 | p04045 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
int n, k;
cin >> n >> k;
vector<int> d(k);
for(int i = 0;i < k;i++){
cin >> d[i];
}
vector<int> uk(10 - k);
for(int i = 0;i < 10;i++){
if(!binary_search(d.begin(), d.end(), i)){
uk.push_back(i);
}
}
vector... | a.cc: In function 'int main()':
a.cc:99:48: error: expected ';' before ')' token
99 | ans += r[0] + i);
| ^
| ;
|
s611473958 | p04045 | C++ | #include <bits/stdc++.h>
#define loop(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) loop(i,0,n)
#define dump(x) cerr << #x << " = " << (x) << endl
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << endl
using namespace std;
int main(){
ios_base::sync_with_stdio(false); cin.tie(0... | a.cc: In function 'int main()':
a.cc:36:22: error: lvalue required as left operand of assignment
36 | if( t > max_like || kk = 1){
| ~~~~~~~~~~~~~^~~~~
|
s019307018 | p04045 | C++ | int SolveCSub(int pay, int digit, const bool hate[10], int N){
if(digit <= 0){
if(pay >= N) return pay;
else return 100000;
}
int iret = 100000;
for(int i = 0; i < 10; i++){
if(hate[i] && !(i == 0 && digit == 10000)) continue;
int a = SolveCSub(pay + i * digit, digit/10, hate, N);
if (a < i... | a.cc: In function 'void SolveC()':
a.cc:19:3: error: 'cin' was not declared in this scope
19 | cin >> N >> K;
| ^~~
a.cc:26:3: error: 'cout' was not declared in this scope
26 | cout << SolveCSub(0,100000,hate, N) << endl;
| ^~~~
a.cc:26:42: error: 'endl' was not declared in this scope
26 | ... |
s932075628 | p04045 | Java |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
List<Integer> Dlist = new ArrayList<>();
for(int i=0; i<K; i++){
Diist.add(sc.nextInt());
}
for(int i=N;i==10000;i++){
while(... | Main.java:10: error: cannot find symbol
Diist.add(sc.nextInt());
^
symbol: variable Diist
location: class Main
1 error
|
s367275041 | p04045 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int cmp(const void *a, const void *b){
return *(const int*)a-*(const int*)b;
}
int main(){
int i,j,n,k;
char s[5];
char a[10];
int len;
int d[10];
scanf("%d%d",&n,&k);
itoa(n,s,10);
for(i=k;i--;)scanf("%d",&d[i]);
qsort(d,k,sizeof(d[0]),cmp);
for(i=... | main.c: In function 'main':
main.c:17:9: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
17 | itoa(n,s,10);
| ^~~~
|
s556929384 | p04045 | Java |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
List<int> Dlist = new ArrayList<>();
for(int i=0; i<K; i++){
Diist.add(sc.nextInt());
}
for(int i=N;i==10000;i++){
while(i/10... | Main.java:8: error: unexpected type
List<int> Dlist = new ArrayList<>();
^
required: reference
found: int
Main.java:10: error: cannot find symbol
Diist.add(sc.nextInt());
^
symbol: variable Diist
location: class Main
2 errors
|
s367798798 | p04045 | Java |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
List<int> Dlist = new ArrayList<>();
for(int i=0; i<K; i++){
Diist.add(sc.nextInt();
}
for(int i=N;i==10000;i++){
while(i/10 ... | Main.java:10: error: ')' or ',' expected
Diist.add(sc.nextInt();
^
1 error
|
s096441387 | p04045 | Java |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
List<int> Dlist = new ArrayList<>();
for(int i=0; i<K; i++){
Diist.add(K);
}
for(int i=N;i==10000;i++){
while(i/10 != 0){
... | Main.java:8: error: unexpected type
List<int> Dlist = new ArrayList<>();
^
required: reference
found: int
Main.java:10: error: cannot find symbol
Diist.add(K);
^
symbol: variable Diist
location: class Main
2 errors
|
s473595024 | p04045 | Java |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
List<int> Dlist = new ArrayList<>();
for(int i=0; i<K; i++){
Diist.add(K);
}
for(int i=N;i==10000;i++){
while(i/10 != 0){
... | Main.java:25: error: class, interface, enum, or record expected
}
^
1 error
|
s813326395 | p04045 | C++ | #include <iostream>
#include <queue>
#include <map>
#include <list>
#include <vector>
#include <string>
#include <limits>
#include <cassert>
#include <fstream>
#include <cstring>
#include <bitset>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <cstdio>
#include <ciso646>
#include <array>
using ... | a.cc: In function 'int d(std::vector<int>)':
a.cc:57:62: error: 'pow' was not declared in this scope
57 | REP(i, nums.size()) num += nums[i] * pow(10, i);
| ^~~
a.cc: In function 'int main()':
a.cc:69:20: error: 'log10' was no... |
s693234138 | p04045 | C++ | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int N, K;
N = scanner.nextInt();
K = scanner.nextInt();
String[] D = new String[K];
for (int i = 0; i < K; i++) {
D[i] = scanner.next();
}
a: while (true) {
for (int... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s458254054 | p04045 | C++ | #include<cstdio>
#include<iostream>
#include<cmath>
#include<vector>
#include <cstdlib>
#include<string>
#include<algorithm>
#include<map>
#define ll long long
#define LL long long
#define ULL unsigned long long
#define ull unsigned long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define RFOR(i,a,b) for(int i=(b)-... | a.cc: In function 'int main()':
a.cc:46:21: error: 'strlen' was not declared in this scope
46 | num_count = strlen(N);
| ^~~~~~
a.cc:9:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
8 | #include<map>
+++ |+#include <... |
s544477215 | p04045 | C++ | #include<cstdio>
#include<iostream>
#include<cmath>
#include<vector>
#include <cstdlib>
#include<string>
#include<algorithm>
#include<map>
#define ll long long
#define LL long long
#define ULL unsigned long long
#define ull unsigned long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define RFOR(i,a,b) for(int i=(b)-... | a.cc: In function 'int main()':
a.cc:46:21: error: 'strlen' was not declared in this scope
46 | num_count = strlen(N);
| ^~~~~~
a.cc:9:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
8 | #include<map>
+++ |+#include <... |
s992115366 | p04045 | C++ | #include<cstdio>
#include<iostream>
#include<cmath>
#include<vector>
#include <cstdlib>
#include<string>
#include<algorithm>
#include<map>
#define ll long long
#define LL long long
#define ULL unsigned long long
#define ull unsigned long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define RFOR(i,a,b) for(int i=(b)-... | a.cc: In function 'int main()':
a.cc:47:16: error: 'strlen' was not declared in this scope
47 | REP(i, strlen(N)) {
| ^~~~~~
a.cc:16:32: note: in definition of macro 'REP'
16 | #define REP(i,n) for(int i=0;i<n;i++)
| ^
a.cc:9:1: note: 'strlen' is d... |
s976787730 | p04045 | C++ | #include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
using namespace std;
int main(){
int N,K,tmp;
vector<int> D;
string stream ss;
string s;
bool f... | a.cc: In function 'int main()':
a.cc:20:23: error: expected initializer before 'ss'
20 | string stream ss;
| ^~
a.cc:31:17: error: 'ss' was not declared in this scope; did you mean 's'?
31 | ss<<i;
| ^~
| s
|
s010981973 | p04045 | C++ |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#include <complex>
#include <functional>
#include <cmath>
using namespace std;
using ull = unsigned long long;
using ll = long long;
int main(){
int N, K;
cin >> N >> K;
vector<string> isUnuse;
for ... | a.cc: In function 'int main()':
a.cc:34:29: error: 'strstr' was not declared in this scope
34 | if (strstr(str.c_str(), a.c_str()) == NULL){
| ^~~~~~
a.cc:11:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cst... |
s623328255 | p04046 | C++ | #include <stdio.h>
#include <stdlib.h> // _____ _ _ __ __ ____ __ _
#include <string.h> // / ____| | | | | | \ / | / \ | \ | |
#include <math.h> // | |___ | | | | | \/ | / _ \ | . \ | |
#include <stdbool.h> // \____ \ | | | | | |\__/| | | /_\ | | |\ \| |
#... | a.cc:10:65: error: expected unqualified-id before '==' token
10 | ==
| ^~
|
s524100024 | p04046 | C++ |
#include <stdio.h>
#include <stdlib.h> // _____ _ _ __ __ ____ __ _
#include <string.h> // / ____| | | | | | \ / | / \ | \ | |
#include <math.h> // | |___ | | | | | \/ | / _ \ | . \ | |
#include <stdbool.h> // \____ \ | | | | | |\__/| | | /_\ | | |\ \| |
... | a.cc:12:9: error: "and" cannot be used as a macro name as it is an operator in C++
12 | #define and &&
| ^~~
a.cc:13:9: error: "or" cannot be used as a macro name as it is an operator in C++
13 | #define or ... |
s041143522 | p04046 | C++ | typedef struct Combinatorics{
private:
long long MOD = 1e9 + 7;
vector<long long> fac, inv_fac;
public:
Combinatorics(int N, long long MOD = 1e9 + 7): fac(N + 1, 1ll), inv_fac(N + 1, 1ll), MOD(MOD){
for(int i = 2; i <= N; i ++){
fac[i] = fac[i - 1] * i % MOD;
inv_fac[i] = ... | a.cc:5:5: error: 'vector' does not name a type
5 | vector<long long> fac, inv_fac;
| ^~~~~~
a.cc: In constructor 'Combinatorics::Combinatorics(int, long long int)':
a.cc:8:52: error: class 'Combinatorics' does not have any field named 'fac'
8 | Combinatorics(int N, long long MOD = 1e9 + 7): fa... |
s179975966 | p04046 | C++ | for (int i = B+1; i <= W; ++i) {
int inc = mul(C(H - A + i - 2, i - 1), C(A + W - i - 1, A - 1));
res = add(res, inc);
}
| a.cc:1:4: error: expected unqualified-id before 'for'
1 | for (int i = B+1; i <= W; ++i) {
| ^~~
a.cc:1:22: error: 'i' does not name a type
1 | for (int i = B+1; i <= W; ++i) {
| ^
a.cc:1:30: error: expected unqualified-id before '++' token
1 | for (int i = B+1; ... |
s199579569 | p04046 | Java | import com.sun.istack.internal.Nullable;
import java.io.*;
import java.util.*;
/**
* Created by Katushka on 11.03.2020.
*/
public class Main {
static int[] readArray(int size, InputReader in) {
int[] a = new int[size];
for (int i = 0; i < size; i++) {
a[i] = in.nextInt();
}
... | Main.java:1: error: package com.sun.istack.internal does not exist
import com.sun.istack.internal.Nullable;
^
Main.java:68: error: cannot find symbol
private static long inv(long x, long mod, @Nullable Map<Long, Long> cache) {
^
symbol: ... |
s415849012 | p04046 | C++ | 10 7 3 4 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10 7 3 4
| ^~
|
s137818977 | p04046 | C++ | /*
▓█████▄ ▄████▄ ▓██ ██▓ ██▓███ ██░ ██ ▓█████ ██▀███
▒██▀ ██▌▒██▀ ▀█ ▒██ ██▒▓██░ ██▒▓██░ ██▒▓█ ▀ ▓██ ▒ ██▒
░██ █▌▒▓█ ▄ ▒██ ██░▓██░ ██▓▒▒██▀▀██░▒███ ▓██ ░▄█ ▒
░▓█▄ ▌▒▓▓▄ ▄██▒ ░ ▐██▓░▒██▄█▓▒ ▒░▓█ ░██ ▒▓█ ▄ ▒██▀▀█▄
░▒████▓ ▒ ▓███▀ ░ ░ ██▒▓░▒██▒ ░ ░░▓█▒░██▓░▒████▒░██▓ ▒██▒
▒▒▓ ▒ ░ ░▒ ▒ ... | a.cc: In function 'long long int C(long long int, long long int)':
a.cc:63:18: error: 'F' was not declared in this scope
63 | ll res = F[n];
| ^
|
s328016060 | p04046 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int mod = 1e9+7;
int h, w, a, b;
cin >> h >> w >> a >> b;
vector<vector<ll>> dp(h, vector<ll>(w));
dp[0][0] = (a < h ? 1ll : 0);
for(int i=0; i<h; i++){
for(int j=0; j<w; j++){
if(i||j)
dp[i][j] = (h-... | a.cc: In function 'int main()':
a.cc:12:23: error: 'll' was not declared in this scope
12 | vector<vector<ll>> dp(h, vector<ll>(w));
| ^~
a.cc:12:23: error: template argument 1 is invalid
a.cc:12:23: error: template argument 2 is invalid
a.cc:12:25: error: template argument 1 is i... |
s530649646 | p04046 | C | #include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
long long modpow(long long x, long long y, long long n) {
long long res = 1;
x%=n;
while (y>0) {
if (y%2==1) {
res*=x;
res%=n;
}
y/=2;
x*=x;
x%=n;
}
return res;
}... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s888905605 | p04046 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef long long ll;
#define rep(i,l,r) for(int i=l;i<=r;i++)
#define REP(i,l,r) for(int i=l;i>=r;i--)
#define fi first
#define se second
#define eb emplace_back
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL)... | a.cc: In function 'll fact(const ll&)':
a.cc:20:33: error: expected ';' before ')' token
20 | for(n > fft_sz; ++fft_sz) fft[fft_sz+1] = (fft[fft_sz]*(fft_sz+1)) % mod;
| ^
| ;
|
s560416745 | p04046 | C++ | #include <iostream>
using namespace std;
#define mod 1000000007
long long fact[1000005];
fact[0] = 1;
void precompute() {
for (int i = 1; i < 1000000; i++) {
fact[i] = (i * (fact[i - 1] % mod)) % mod;
}
}
long long power(int x, int y, int m) {
if (y == 0)
return 1;
long long p = (power(x, y ... | a.cc:8:1: error: 'fact' does not name a type
8 | fact[0] = 1;
| ^~~~
a.cc: In function 'long long int modinv(long long int)':
a.cc:28:25: error: 'm' was not declared in this scope
28 | return power(x, m - 2, m);
| ^
a.cc: In function 'int main()':
a.cc:39:32: error: ex... |
s428446262 | p04046 | C++ | #include <iostream>
using namespace std;
long long npaths(int rows, int cols) {
if (rows == 1 || cols == 1) {
return 1;
}
return ((npaths(rows - 1, cols) % 1000000007) + (npaths(rows, cols - 1) % 1000000007)) % 1000000007 << endl;
}
int main() {
long long h, w, a, b;
cin >> h >> w >> a >> b;
cout... | a.cc: In function 'long long int npaths(int, int)':
a.cc:9:109: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
9 | return ((npaths(rows - 1, cols) % 1000000007) + (npaths(rows, cols - 1) % 1000000007)) % 1000000007 << endl;
| ... |
s311857992 | p04046 | C++ | include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
const int MAXN = 1e6 + 5;
ll modpow(ll a, ll b) {
ll res = 1;
while (b) {
if (b&1)
res = (res * a) % MOD;
a = (a * a) % MOD;
b >>= 1;
}
return res;
}
ll f[MAXN];
ll invf[MAXN];
ll ncr(ll n, ll r) {
... | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:29:3: error: 'cin' was not declared in this scope
29 | cin >> h >> w >> a >> b;
| ^~~
a.cc:42:3: error: 'cout' was not declared in this scope
42 | cout << res << '\n';
... |
s533074168 | p04046 | C++ | #include <stdio.h>
int H,W,A,B;
int res;
bool grid[100001][100001];
void recurse(int row,int col)
{
//base case 1
if (row==H && col==W)
{
res++;
break;
}
//base case 2
if (grid[row][col]==false)
break;
//recursive calls
else
{
if (grid[row+1][col]==true && grid[row+1][col]<=H)
recurse(row+1,col);... | a.cc: In function 'void recurse(int, int)':
a.cc:12:17: error: break statement not within loop or switch
12 | break;
| ^~~~~
a.cc:17:17: error: break statement not within loop or switch
17 | break;
| ^~~~~
a.cc: In function 'int main()':
... |
s516927607 | p04046 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long h = Integer.parseInt(sc.next());
long w = Integer.parseInt(sc.next());
long a = Integer.parseInt(sc.next());
long b = Integer.parseInt(sc.next());
long mod = 1000000007l;
... | Main.java:12: error: incompatible types: possible lossy conversion from long to int
long[] factorialArray = new long[(int)h+w];
^
1 error
|
s156813078 | p04046 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long h = Integer.parseInt(sc.next());
long w = Integer.parseInt(sc.next());
long a = Integer.parseInt(sc.next());
long b = Integer.parseInt(sc.next());
long mod = 1000000007l;
... | Main.java:12: error: incompatible types: possible lossy conversion from long to int
long[] factorialArray = new long[h+w];
^
Main.java:15: error: incompatible types: possible lossy conversion from long to int
factorialArray[i] *= i%mod*factorialArray[i-1l]%mod;
... |
s479424187 | p04046 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long h = Integer.parseInt(sc.next());
long w = Integer.parseInt(sc.next());
long a = Integer.parseInt(sc.next());
long b = Integer.parseInt(sc.next());
long mod = 1000000007l;
... | Main.java:20: error: illegal start of expression
private static long power(long n, long pow, long mod){
^
1 error
|
s352085136 | p04046 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long h = Integer.parseInt(sc.next());
long w = Integer.parseInt(sc.next());
long a = Integer.parseInt(sc.next());
long b = Integer.parseInt(sc.next());
long mod = 1000000007l;
... | Main.java:58: error: reached end of file while parsing
}
^
1 error
|
s237537415 | p04046 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int h = Integer.parseInt(sc.next());
int w = Integer.parseInt(sc.next());
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int modnum = 1000000007;
... | Main.java:23: error: not a statement
int = r
^
Main.java:23: error: ';' expected
int = r
^
Main.java:23: error: not a statement
int = r
^
Main.java:23: error: ';' expected
int = r
^
4 errors
|
s642305298 | p04046 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int h = Integer.parseInt(sc.next());
int w = Integer.parseInt(sc.next());
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int modnum = 1000000007;
... | Main.java:12: error: method modFactorial in class Main cannot be applied to given types;
int total = modFactorial(h-w-2, h-1)*modFactorial(h-w-2, w-1)/modFactorial(h-w-2)%modnum;
^
required: int,int
found: int
reason: actual and formal argum... |
s947842844 | p04046 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int h = Integer.parseInt(sc.next());
int w = Integer.parseInt(sc.next());
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int modnum = 1000000007;
... | Main.java:13: error: method modFactorial in class Main cannot be applied to given types;
r = r*modFactorial(w+a-b, a)%modnum*modFactorial(w+a-b, w-b)%modnum/modFactorial(w+a-b);
^
required: int,int
found: int
reason: actual and formal ... |
s041430433 | p04046 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int h = Integer.parseInt(sc.next());
int w = Integer.parseInt(sc.next());
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int modnum = 1000000007;
... | Main.java:12: error: cannot find symbol
int r = modFactorial(h-a+b, h-a)%modnum*modfactorial(h-a+b, b)%modnum/modFactorial(h-a+b, 1);
^
symbol: method modfactorial(int,int)
location: class Main
Main.java:13: error: method modFactorial in class Main cannot be applied... |
s559197608 | p04046 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner();
int h = Integer.parseInt(sc.next());
int w = Integer.parseInt(sc.next());
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int modnum = 1000000007;
int r... | Main.java:5: error: no suitable constructor found for Scanner(no arguments)
Scanner sc = new Scanner();
^
constructor Scanner.Scanner(Readable,Pattern) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(Readable) is not applicable
(... |
s162667250 | p04046 | Java | import java.util.Scanner;
calss Main{
public static void main(String[] args){
Scanner sc = new Scanner();
int h = Integer.parseInt(sc.next());
int w = Integer.parseInt(sc.next());
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int modnum = 1000000007;
int r... | Main.java:3: error: class, interface, enum, or record expected
calss Main{
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
^
(use --enable-preview to enable unnamed classes)
2 errors
|
s583183617 | p04046 | C++ | // freopen("input.txt", "rt", stdin);
// freopen("output.txt", "wt", stdout);
#define _GLIBCXX_DEBUG//only for debugging
#include <bits/stdc++.h>
#include <chrono>
#include <ext/rope>
#define VALHALLA ios_base::sync_with_stdio(false);cin.tie(0);cout<<fixed<<setprecision(13);
#define endl "\n"
#define pb push_back
#defi... | /tmp/cc3zziIu.o: in function `solve(int, int)':
a.cc:(.text+0x28a): relocation truncated to fit: R_X86_64_PC32 against symbol `h' defined in .bss section in /tmp/cc3zziIu.o
a.cc:(.text+0x290): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/cc3zziIu.o
a.cc:(.text+0x29d): re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.