submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s478970810 | p03730 | C++ | #include <cstdio>
int main()
{
int a,b,c,num;
scanf("%d%d%d",&a,&b,&c);
for(i=0;i<=1000;i++)
{
ans=a*i;
if(ans%b==c)
{
printf("YES\n");
return 0;
}
}
printf("NO\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'i' was not declared in this scope
6 | for(i=0;i<=1000;i++)
| ^
a.cc:8:9: error: 'ans' was not declared in this scope
8 | ans=a*i;
| ^~~
|
s020400095 | p03730 | C++ | #include<bits/stdc++.h>
using namespace std;
int a, b, c;
int count = 0;
int main(){
cin >> a >> b >> c;
for(int i = 1; i < 1000; i++){
count += i*a;
}
if(count % b == c) cout << "Yes" << endl;
else cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:8:5: error: reference to 'count' is ambiguous
8 | count += i*a;
| ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/pstl/glue_... |
s756688591 | p03730 | C++ | #include<bits/stdc++.h>
using namespace std;
int a, b, c;
int count = 0;
int main(){
cin >> a >> b >> c;
for(int i = 1; i < 1000; i++){
count += i*a
}
if(count % b == c) cout << "Yes" << endl;
else cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:8:5: error: reference to 'count' is ambiguous
8 | count += i*a
| ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/pstl/glue_a... |
s674099300 | p03730 | C++ | #include<iostream>
using namespace std;
int main(){
long long a,b,c,i;
cin>>a>>b>>c;
for(i=1;i<=1000;++i){
if((a*i)%b==c){
cout<<"YES"<<endl;
goto endapp:
}
}
cout<<"NO"<<endl;
endapp:
return 0;
} | a.cc: In function 'int main()':
a.cc:9:24: error: expected ';' before ':' token
9 | goto endapp:
| ^
| ;
a.cc:9:24: error: expected primary-expression before ':' token
|
s783632491 | p03730 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c; cin >> a >> b >> c;
for(int i=a; i <= b * a; i *= a){
if(i % b == c){
cout << "YES" << endl;
}
cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:10:2: error: expected '}' at end of input
10 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s606674779 | p03730 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include "bits/stdc++.h"
using nam... | a.cc: In function 'int main()':
a.cc:30:10: error: 'a' was not declared in this scope
30 | cin>>a>>b>>c;
| ^
a.cc:30:13: error: 'b' was not declared in this scope
30 | cin>>a>>b>>c;
| ^
a.cc:30:16: error: 'c' was not declared in this scope
30 | cin>>a>>b>>c;
|... |
s288327099 | p03730 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
long long n,m,y;
cin>>n>>m>>y;
for(int i=1;i<=1000;i++)
{
if((a*s)%b==c)
{
cout<<"YES"<<endl;
return 0;
}
}
cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:13: error: 'a' was not declared in this scope
9 | if((a*s)%b==c)
| ^
a.cc:9:15: error: 's' was not declared in this scope
9 | if((a*s)%b==c)
| ^
a.cc:9:18: error: 'b' was not declared in this scope
9 | if((a... |
s066291847 | p03730 | C++ | int main()
{
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
while(A != 0 && B != 0) {
int a = A, b = B;
if(a > b) {
A = a % b;
} else {
B = b % a;
}
}
printf("%s", (A != 0 && C % A == 0 || B != 0 && C % B == 0) ? "YES" : "NO");
r... | a.cc: In function 'int main()':
a.cc:4:5: error: 'scanf' was not declared in this scope
4 | scanf("%d %d %d", &A, &B, &C);
| ^~~~~
a.cc:15:5: error: 'printf' was not declared in this scope
15 | printf("%s", (A != 0 && C % A == 0 || B != 0 && C % B == 0) ? "YES" : "NO");
| ^~~~~~
a.cc:... |
s202777274 | p03730 | C | #include<stdio.h>
int main()
{
int a,b,c,f=0;
// 整数の入力
// スペース区切りの整数の入力
scanf("%d %d %d",&a,&b,&c);
// 出力
for(int i=1;i<=b;i++){
if((a*i-c)%b==0){
printf("YES");
f=1;
break;
}
} | main.c: In function 'main':
main.c:15:3: error: expected declaration or statement at end of input
15 | }
| ^
|
s361403004 | p03730 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>C;
REP(i,b){
if(i*a%b==c){
cout<<"YES"<<endl;
return 0;
}
}
cout<<"NO"<<endl;
} | a.cc: In function 'int main()':
a.cc:7:16: error: 'C' was not declared in this scope
7 | cin>>a>>b>>C;
| ^
|
s059591359 | p03730 | C | #include<stdio.h>
int main()
{
int a,b,c;
// 整数の入力
// スペース区切りの整数の入力
scanf("%d %d %d",&a,&b,&c);
// 出力
for(int i=1;i<=b;i++){
if((a*i-c)%b==0){
printf("YES");
}
printf("NO");
return 0;
} | main.c: In function 'main':
main.c:15:1: error: expected declaration or statement at end of input
15 | }
| ^
|
s519016593 | p03730 | C | #include<stdio.h>
int main()
{
int a,b,c;
// 整数の入力
// スペース区切りの整数の入力
scanf("%d,%d %d",&a,&b,&c);
// 出力
for(int i=0;i<b;i++){
if((a*i-c)%b==0){
printf("YES");
}else printf(“NO”);
}
return 0;
} | main.c: In function 'main':
main.c:12:20: error: stray '\342' in program
12 | }else printf(<U+201C>NO<U+201D>);
| ^~~~~~~~
main.c:12:23: error: stray '\342' in program
12 | }else printf(<U+201C>NO<U+201D>);
| ^~~~~~~~
main.c:12:21: error: 'NO... |
s329344023 | p03730 | C | #include<stdio.h>
int main()
{
int a,b,c;
// 整数の入力
// スペース区切りの整数の入力
scanf("%d,%d %d",&a,&b,&c);
// 出力
for(int i=0;i<b;i++){
if((a*n-c)%b==0){
printf("YES");
}else printf(“NO”);
}
return 0;
} | main.c: In function 'main':
main.c:10:11: error: 'n' undeclared (first use in this function)
10 | if((a*n-c)%b==0){
| ^
main.c:10:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:20: error: stray '\342' in program
12 | }else printf(<U+2... |
s764390386 | p03730 | C | #include<stdio.h>
int main()
{
int a,b,c;
// 整数の入力
// スペース区切りの整数の入力
scanf("%d,%d %d",&a,&b,&c);
// 出力
for(int i=0;i<b;i++){
if((a*n-c)%b==0){
printf("YES");
}else printf(“NO”);
}
return 0;
} | main.c: In function 'main':
main.c:10:11: error: 'n' undeclared (first use in this function)
10 | if((a*n-c)%b==0){
| ^
main.c:10:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:20: error: stray '\342' in program
12 | }else printf(<U+2... |
s190805369 | p03730 | C | #include<stdio.h>
int main()
{
int a,b,c;
// 整数の入力
// スペース区切りの整数の入力
scanf("%d,%d %d",&a,&b,&c);
// 出力
for(int i=0;i<b;i++){
if((a*n-c)%b==0){
printf("YES");
}else printf(“NO”);
}
return 0;
} | main.c: In function 'main':
main.c:10:11: error: 'n' undeclared (first use in this function)
10 | if((a*n-c)%b==0){
| ^
main.c:10:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:20: error: stray '\342' in program
12 | }else printf(<U+2... |
s626789896 | p03730 | C++ | #include <iostream>
using namespace std;
bool check(int A, int B, int C){
for(int i=0; i<B; i++){
if((A*i))%B == C) return true;
}
return false;
}
int main(){
cin.tie(0);
ios::sync_with_stdio(false);//高速化、endlは使わない
int A, B, C;
cin >> A >> B >> C;
if (check(A,B,C)) cout << "Yes" << "\n";
el... | a.cc: In function 'bool check(int, int, int)':
a.cc:7:14: error: expected primary-expression before '%' token
7 | if((A*i))%B == C) return true;
| ^
|
s425384552 | p03730 | C++ | 77 42 36
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 77 42 36
| ^~
|
s395470164 | p03730 | C++ | a, b, c = map(int, input().split())
def judhe(a, b, c):
for i in range(b+1):
if (a*i) % b == c:
return 1
return 0
print("YES" if judhe(a, b, c) else "NO") | a.cc:1:1: error: 'a' does not name a type
1 | a, b, c = map(int, input().split())
| ^
|
s142103228 | p03730 | C++ | #include<bits/stdc++.h>
#define LL long long
using namespace std;
int main(){
int a,b,c; cin>>a>>b>>c;
if(a==1) cout<<"YES"<<endl
if(a%2 && b%2) cout<<"YES"<<endl;
//else if(a%2 && !(b%2) && c%2) cout<<"YES"<<endl;
else if(!(a%2) && !(b%2) && !(c%2)) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:29: error: expected ';' before 'if'
6 | if(a==1) cout<<"YES"<<endl
| ^
| ;
7 | if(a%2 && b%2) cout<<"YES"<<endl;
| ~~
|
s785102108 | p03730 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(!(a%2) && !(b%2) && c%2) cout<<"NO"<<endl;
else if(a%2 && !(b%2) && !(c%2)) cout<<"NO"<<endl;
else if(a%s && b%2 && !(c%2)) cout<<"NO"<<endl;
else cout<<"YES"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:13: error: 's' was not declared in this scope
8 | else if(a%s && b%2 && !(c%2)) cout<<"NO"<<endl;
| ^
|
s555809947 | p03730 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
typedef long long lng;
#define FOR(i,a,b) for(int i=(a); i<=(b); ++i)
#define FORD(i,b,a) for(int i=(b); i>=(a); --i)
#define REP(i,n) FOR(i,0,n-1)
#define ALL(a) (a).begin(), (a).end()
#define UNIQUE(a) a.erase(unique(ALL(a))... | a.cc: In function 'int main()':
a.cc:28:18: error: no match for 'operator*' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
28 | int a = i*A;
| ~^~
| | |
| | std::string {aka std::__cxx11::basic_string<char... |
s722631903 | p03730 | Java | \import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int A,B,C,num2=0;
A=sc.nextInt();
B=sc.nextInt();
C=sc.nextInt();
for(int a=A;a<=B*A;a++){
int num = a%B;
if(num == C) num2 = ... | Main.java:1: error: illegal character: '\'
\import java.util.*;
^
Main.java:1: error: class, interface, enum, or record expected
\import java.util.*;
^
2 errors
|
s972907006 | p03730 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
int p[100];
for(int i=1;i<=b;i++)p[i-1]=a*i%b;
for(int i=0;i<n;i++){
if(p[i]==c){
cout<<"YES"<<endl;
return 0;
}
}
cout<<"NO"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:23: error: 'n' was not declared in this scope
10 | for(int i=0;i<n;i++){
| ^
|
s394692516 | p03730 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
for(int i = 1; i <= b; i**){
if((a*i)%b == c){
cout << "YES" << endl;
return 0;
}
}
cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:6:29: error: expected primary-expression before ')' token
6 | for(int i = 1; i <= b; i**){
| ^
|
s480913647 | p03730 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
boolean b = false;
for(int i = 0;i < a*b;i += a){
if(i%b == c){
b = true;
break;
}
}
if(b)System.out.pri... | Main.java:8: error: variable b is already defined in method main(String[])
boolean b = false;
^
Main.java:9: error: bad operand types for binary operator '*'
for(int i = 0;i < a*b;i += a){
^
first type: int
second type: boolean
Main.java:10: error: bad operand types for binary op... |
s989377724 | p03730 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
boolean b = false;
for(int i = 0;i < a*b;i += a){
if(i%b == c){
b = true;
break
}
}
if(b)System.out.prin... | Main.java:12: error: ';' expected
break
^
1 error
|
s193031028 | p03730 | Java | import java.util.Scanner;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner();
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int d = a % b;
int k = d;
while(true){
if(c==k){
System.out.println("YES");
return; ... | 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
(... |
s379453535 | p03730 | C++ | #include <iostream>
using namespace std;
int main(){
int A, B, C, j=0;
cin >> A >> B >> C;
for(int i=1; i<=B; i++){
if(A*i%B==C){
j++;
break;
}
if(j!=0) cout << "YES";
else cout << "NO";
}
| a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s391496473 | p03730 | C++ | #include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main(void){
int a, b, c;
cin >> a >> b >> c;
if (c % gcd(a, b) == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:12:17: error: 'gcd' was not declared in this scope
12 | if (c % gcd(a, b) == 0)
| ^~~
|
s995237374 | p03730 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main(void){
int a, b, c;
cin >> a >> b >> c;
if (c % gcd(a, b) == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:11:17: error: 'gcd' was not declared in this scope
11 | if (c % gcd(a, b) == 0)
| ^~~
|
s356330148 | p03730 | C++ | #include <iostream>
#include <gcd>
using namespace std;
int main(void){
int a, b, c;
cin >> a >> b >> c;
if (c % gcd(a, b) == 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
} | a.cc:2:10: fatal error: gcd: No such file or directory
2 | #include <gcd>
| ^~~~~
compilation terminated.
|
s425290204 | p03730 | C++ | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int a, b, c, flag;
int main(){
wihle(cin>>a>>b>>c){
int q == c % b;
flag = 0;
for(int i = 1; i <= 100; i++){
if((a * i) % b == q){
cout<<"YES"<<endl;
flag = 1;
bre... | a.cc: In function 'int main()':
a.cc:10:9: error: 'wihle' was not declared in this scope
10 | wihle(cin>>a>>b>>c){
| ^~~~~
|
s023761239 | p03730 | C++ | #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cstring>
using namespace std;
int main()
{
int a,b,c,i;
scanf("%d%d%d",&a,&b,&c);
n=c%b;
for(i=0;i<=1000;i++){
if((n+b*i)%a==0)
{
printf("YES\n");
break;
}
}
printf("NO\n");
} | a.cc: In function 'int main()':
a.cc:11:9: error: 'n' was not declared in this scope
11 | n=c%b;
| ^
|
s334906108 | p03730 | Java | #include <bits/stdc++.h>
typedef long long LL;
const int MAX = 1000;
using namespace std;
int tu[MAX+5][MAX+5],m,n;
int main(){
int a,b,c;
while(cin>>a>>b>>c){
int m = c%b;
int flag=0,sum=1;
for(int i=1; i<=100; ++i){
sum=a*i;
if(sum==m){
flag=1;
break;
}
}
if(flag)cout<<"YES"<<endl;
el... | Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
^
Main.java:3: error: class, interface, enum, or record expected
const int MAX = 1000;
^
Main.java:4: error: class, interface, enum, or record expected
u... |
s634004718 | p03730 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int A, B, C,;
cin >> A;
cin >> B;
cin >> C;
for (int a = 0; ; a++)
{
if (A % B == 0)
{
cout << "NO" << endl;
return 0;
}
if (A * a % B == C)
{
cout << "YES" << endl;
re... | a.cc: In function 'int main()':
a.cc:5:17: error: expected unqualified-id before ';' token
5 | int A, B, C,;
| ^
|
s438759929 | p03730 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int A, B, C,;
cin >> A;
cin >> B;
cin >> C;
for (int a = 0; ; a++)
{
if (A % B == 0)
{
cout << "NO" << endl;
return 0;
}
if (A * a % B == C)
{
cout << "YES" << endl;
re... | a.cc: In function 'int main()':
a.cc:5:17: error: expected unqualified-id before ';' token
5 | int A, B, C,;
| ^
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:3:15: note: to match this '{'
3 | int main(void){
| ^
|
s994228651 | p03730 | C++ | #include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define PrintLn(X) cout << X << endl
int main(void)
{
int A, B, C;
cin >> A >> B >> C;
int n = 1;
while(1){
if((A * n) % B == C){
PrintLn("YES");
return 0;
}else if((A * n) % B == A % B){
PrintLn("NO");
return 0;
}
n++... | a.cc: In function 'int main()':
a.cc:21:20: error: expected ';' before '}' token
21 | n++
| ^
| ;
22 | }
| ~
|
s951021706 | p03730 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<cstring... | a.cc: In function 'int main()':
a.cc:157:23: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
157 | else cout<"NO"<<endl;
| ~~~~^~~~~~
|
s451947322 | p03730 | C++ | #include <iostream>
#include <string>
using namespace std;
int main () {
int a,b,c,i;
string ans = "NO";
cin >> a >> b >> c;
for(i=1;i<b;i++){
if(i*a%b == c){
ans = "YES";
}
}
cout << ans << endl;
return 0;
| a.cc: In function 'int main()':
a.cc:19:14: error: expected '}' at end of input
19 | return 0;
| ^
a.cc:5:13: note: to match this '{'
5 | int main () {
| ^
|
s896866653 | p03730 | C++ | #include<iostream>
using namespace std;
int A[1000];
int main(){
int a,b,c;
cin>>a>>b>>c;
int baisu=a;
while(!A[baisu]){
A[baisu]=1
baisu+=a;
int amari=baisu%b;
baisu=amari;
if(amari==c){
cout<<"YES"<<endl;
return 0;
}
}
c... | a.cc: In function 'int main()':
a.cc:11:19: error: expected ';' before 'baisu'
11 | A[baisu]=1
| ^
| ;
12 | baisu+=a;
| ~~~~~
|
s518150189 | p03730 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <sstream>
#include <algorithm>
#include <bitset>
#include <limits>
#include <map>
#include <set>
#include <iomanip>
#include <cmath>
using namespace std;
typedef long long int ll;
typedef std::numeric_limits<double> dbl;
const long long int LL_INF=1LL<<6... | a.cc: In function 'int main()':
a.cc:37:22: error: 'C' was not declared in this scope
37 | cin >> A >> B >> C;
| ^
|
s123993487 | p03730 | C++ | #include <iostream>
#include<sstream>
#include<vector>
#include<iterator>
using namespace std;
int main(void)
{
int A, B, C;
cin >> A >> B >> C;
vector<int> table;
table.push_back(A%B);
do
{
int a = table.back() + A;
a %= B;
table.push_back(a);
}while(table.front() !=table.back());
string ret;
if(find... | a.cc: In function 'int main()':
a.cc:22:16: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
22 | if(find(table.begin(), table.end(), C) != table.end())
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14... |
s431342348 | p03730 | C++ | #include <iostream>
using namespace std;
typedef unsigned long long ll;
#define rep(i,a,n) for(ll i = (a);i < (n);i++)
#define lp(i,a,n) for(ll i = (a);i <= (n);i++)
#define MAX 50000000000000ull
int main(){
ll a,b,c;
cin >> a >> b >> c;
if(a == b && c != 0){
cout << "NO" << endl;
return 0;
}else if(a ... | a.cc: In function 'int main()':
a.cc:14:17: error: 'i' was not declared in this scope
14 | }else if(a == i){
| ^
|
s128254464 | p03730 | C++ | #include<stdio.h>
int main()
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
int x;
for(x=1;x<INT_MAX;x++)
{
if((b*x+c)%a==0)
printf("YES");
else
printf("NO");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:11: error: 'INT_MAX' was not declared in this scope
7 | for(x=1;x<INT_MAX;x++)
| ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
1 | #include<stdio.h>
+++ |+#include <climits>
... |
s625337921 | p03730 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int A,B,C;
cin >> A >> B >> C;
for(int i = 1; i <= 10; i++){
if(A * i % B == C){
cout << "YES" << endl;
r... | a.cc: In function 'int main()':
a.cc:18:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
18 | return;
| ^~~~~~
|
s450723872 | p03730 | Java | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
for(int i = 1; i ++) {
if(a % b ==c) {
System.out.println... | Main.java:11: error: ';' expected
for(int i = 1; i ++) {
^
Main.java:19: error: reached end of file while parsing
}
^
2 errors
|
s842030256 | p03730 | Java | object Main {
val s = new java.util.Scanner(System.in)
def main(args: Array[String]) {
val a, b, c = s.nextInt()
for (i <- 1 to b)
if (a * i % b == c) {
println("YES")
return
}
println("NO")
}
}
| Main.java:1: error: class, interface, enum, or record expected
object Main {
^
1 error
|
s901101177 | p03730 | C++ | #include <iostream>
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
int A,B,C;
std::cin >> A;
std::cin >> B;
std::cin >> C;
for(int i=1; i<B; i++)
{
int modAB = (A*i) % B;
bool result = modAB==C;
if(result){
std::cout << "YES" << std::endl;
return 0;
}
}
std::cout << "NO" << std::endl;
... | a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin.tie(0);
| ^~~
| 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; ... |
s708262566 | p03730 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if((b-c) % a == 0) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
| Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s054177979 | p03730 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
a = a % b;
wihle(true){
if(c == 0){
System.out.println("NO");
break;
}
a = a ... | Main.java:13: error: ';' expected
wihle(true){
^
1 error
|
s656867000 | p03730 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main()
{
int A, B, C; cin >> A >> B >> C;
int n = 0;
bool found = false;
int c_digits = 0; int tmp_c = C;
while(tmp_c != 0){
tmp_c >>= 1;
c_digits++;
}
while(n <= pow(10, c_digits) && !found){
if((n * A) % B == C){
found = true;
}
n++;
... | a.cc: In function 'int main()':
a.cc:26:18: error: expected '}' at end of input
26 | return 0;
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s726622429 | p03730 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
long long A,B,C,sum;
int key=0;
cin>>A>>B>>C;
for(int i=1;i<=B;i++){
sum =A*i%B;
if(sum==C)key=1
}
if(key==1)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before '}' token
11 | if(sum==C)key=1
| ^
| ;
12 | }
| ~
|
s845318081 | p03730 | C | #include<stdio.h>
#include<string.h>
char a[]="0123456789";
int main(){
int a,b,c;
int x=0;
int i;
int c=0;
scanf("%d%d%d",&a,&b,&c);
for(i=0;i<1000;i++){
x+=i*a;
if(x%b==c){
c++;
}
}
if(c>0){
printf("YES\n");
}else{
printf("NO\n");
}
return 0;
} | main.c: In function 'main':
main.c:9:5: error: redeclaration of 'c' with no linkage
9 | int c=0;
| ^
main.c:6:9: note: previous declaration of 'c' with type 'int'
6 | int a,b,c;
| ^
|
s096878697 | p03730 | C++ | #include <iostream>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
int x = c % b;
bool f = 0;
for (int i = 1; i <= 100; i++) {
if (i * a % b == x) {
f = 1;
break;
}
}
if (f)
cout << "YES"
else
cout << "NO";
return 0;
} | a.cc: In function 'int main()':
a.cc:17:14: error: expected ';' before 'else'
17 | cout << "YES"
| ^
| ;
18 | else
| ~~~~
|
s779686655 | p03730 | C++ | //------------入力------------
int A = 0, B = 0, C = 0;
cin >> A >> B >> C;
//------------出力------------
int j = 0;
for (int i = 1; i <= B; ++i) {
if (i*A % B == C) {
cout << "YES" << endl;
j = 1;
break;
}
}
if (j == 0) cout << "NO" << endl; | a.cc:3:17: error: 'cin' does not name a type
3 | cin >> A >> B >> C;
| ^~~
a.cc:7:17: error: expected unqualified-id before 'for'
7 | for (int i = 1; i <= B; ++i) {
| ^~~
a.cc:7:33: error: 'i' does not name a type
7 | ... |
s998436398 | p03730 | C++ | #include <iostream>
using namespace std;
int main() {
//------------入力------------
int A = 0, B = 0, C = 0;
cin >> A >> B >> C;
//------------出力------------
for (int i = 0;; ++i) {
if ((i*A % 2 == 0 && (i*A / B) % 2 == 1 && B % 2 == 1 && C % 2 == 0) || (i*A % 2 == 0 && B % 2 == 0 && C % 2 == 1)) {
cout ... | a.cc:2:1: error: extended character is not valid in an identifier
2 |
| ^
a.cc:4:1: error: extended character is not valid in an identifier
4 |
| ^
a.cc:9:1: error: extended character is not valid in an identifier
9 |
| ^
a.cc:2:1: error: '\U000000a0' does not name a type
2... |
s485175997 | p03730 | C++ | #include <iostream>
using namespace std;
int main() {
//------------入力------------
int A = 0, B = 0, C = 0;
cin >> A >> B >> C;
//------------出力------------
for (int i = 1;; ++i) {
if ((i*A % 2 == 0 && (i*A / B) % 2 == 1 && B % 2 == 1 && C % 2 == 0) || (i*A % 2 == 0 && B % 2 == 0 && C % 2 == 1)) {
cout ... | a.cc:2:1: error: extended character is not valid in an identifier
2 |
| ^
a.cc:4:1: error: extended character is not valid in an identifier
4 |
| ^
a.cc:9:1: error: extended character is not valid in an identifier
9 |
| ^
a.cc:23:1: error: extended character is not valid in a... |
s200075758 | p03730 | C++ | include <stdio.h>
int main(void){
int a,b,c,n;
scanf("%d %d %d",&a,&b,&c);
while((a*n)%b!=c){
n++;
if(n==9999999){
printf("NO\n");
}
}
printf("YES\n");
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <stdio.h>
| ^~~~~~~
|
s991392625 | p03730 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c; cin>>a>>b>>c;
for(int i = 0 ; i < 100 ; i++)
{
if ((b*i + c)%a == 0))
{
cout<<"YES";
return 0;
}
}
cout<<"NO";
return 0;
} | a.cc: In function 'int main()':
a.cc:10:22: error: expected primary-expression before ')' token
10 | if ((b*i + c)%a == 0))
| ^
|
s226686461 | p03730 | C++ | #include<cstdio>
#include<vector>
#include<iostream>
using namespace std;
int gcd(int a,int b){if(a<b){swap(a,b)};if(b==0){return a;}return gcd(a%b,b);}
int main(void){
int a,b,c;
cin>>a>>b>>c;
if(c%gcd(a,b)==0){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
return 0;
} | a.cc: In function 'int gcd(int, int)':
a.cc:5:39: error: expected ';' before '}' token
5 | int gcd(int a,int b){if(a<b){swap(a,b)};if(b==0){return a;}return gcd(a%b,b);}
| ^
| ;
|
s613752763 | p03730 | C++ | #include<cstdio>
#include<vector>
#include<iostream>
using namespace std;
int gcd(int a,int b){if(a<b){swap(a,b)};if(b==0){return a;}return gcd(a%b,b);}
int main(void){
int a,b,c;
cin>>a>>b>>c;
if(c%gcd(a,b)==0){cout<<"YES"<endl;}else{cout<<"NO"<<endl;}
return 0;
} | a.cc: In function 'int gcd(int, int)':
a.cc:5:39: error: expected ';' before '}' token
5 | int gcd(int a,int b){if(a<b){swap(a,b)};if(b==0){return a;}return gcd(a%b,b);}
| ^
| ;
a.cc: In function 'int main()':
a.cc:9:38: error: ... |
s537158405 | p03730 | C++ | #include<cstdio>
#include<vector>
#include<iostream>
using namespace std;
int gcd(int a,int b){if(a<b){swap(a,b);if(b==0){return a;}return gcd(a%b,b);}
int main(void){
int a,b,c;
cin>>a>>b>>c;
if(c%gcd(a,b)==0){cout<<"YES"<endl;}else{cout<<"NO"<<endl;}
return 0;
} | a.cc: In function 'int gcd(int, int)':
a.cc:6:15: error: a function-definition is not allowed here before '{' token
6 | int main(void){
| ^
a.cc:11:2: error: expected '}' at end of input
11 | }
| ^
a.cc:5:21: note: to match this '{'
5 | int gcd(int a,int b){if(a<b){swap(a,b);if(b==... |
s944546452 | p03730 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int a=scanner.nextInt();
int b=scanner.nextInt();
int c=scanner.nextInt();
for(int i=1;i<=100;i++){
if((a*i)%b==c){
break... | Main.java:13: error: cannot find symbol
if((a*i)%b==c){
^
symbol: variable i
location: class Main
1 error
|
s262344216 | p03730 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int a=scanner.nextInt();
int b=scanner.nextInt();
int c=scanner.nextInt();
for(i=1;i<=100;i++){
if((a*i)%b==c){
break;
... | Main.java:8: error: cannot find symbol
for(i=1;i<=100;i++){
^
symbol: variable i
location: class Main
Main.java:8: error: cannot find symbol
for(i=1;i<=100;i++){
^
symbol: variable i
location: class Main
Main.java:8: error: cannot find symbol
for(i=1;i<=10... |
s143644563 | p03730 | C++ | A, B, C = gets.split.map(&:to_i)
i = 1
h = {}
flag = false
while 1
y = A * i % B
break if h.has_key?(y)
h[y] = 1
if y == C
flag = true
break
end
i += 1
end
puts flag ? "YES" : "NO" | a.cc:1:1: error: 'A' does not name a type
1 | A, B, C = gets.split.map(&:to_i)
| ^
a.cc:5:1: error: 'flag' does not name a type
5 | flag = false
| ^~~~
|
s160228010 | p03730 | C++ | #include<iostream>
using namespace std;
int main(void)
{
int A;
int B;
int C;
int i;
cin >> A;
cin >> B;
cin >> C;
for (i = 0; i <= B; i++) {
if (i*A%B == C) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:26:10: error: expected '}' at end of input
26 | }
| ^
a.cc:4:9: note: to match this '{'
4 | {
| ^
|
s117634036 | p03730 | C++ | #include<iostream>
using namespace std;
int main() {
int A,B,C;
cin >> A >> B >> C;
for (int i = 0; i <= B; i++) {
if ((A*i) % B == C) {
cout << "YES" << endl;
return 0;
}
}
cout << "NO" << endl; | a.cc: In function 'int main()':
a.cc:16:30: error: expected '}' at end of input
16 | cout << "NO" << endl;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s271405741 | p03730 | C++ | int main()
{
int a, b, c;
cin >> a >> b >> c;
for (int i = 1; i <= b; i++)
{
if ((i*a)%b==c)
{
cout << "YES";
}
}
cout << "NO";
return 0;
} | a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
4 | cin >> a >> b >> c;
| ^~~
a.cc:9:25: error: 'cout' was not declared in this scope
9 | cout << "YES";
| ^~~~
a.cc:12:9: error: 'cout' was not decla... |
s333525539 | p03730 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int a,b,c;
cin>>a>>b>>c;
bool f=0;
for(int i=1;i<1000;i++)
f|=((a*i)%b==c)
cout<<(f?"YES":"NO")<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before 'cout'
9 | f|=((a*i)%b==c)
| ^
| ;
10 | cout<<(f?"YES":"NO")<<endl;
| ~~~~
|
s649268506 | p03730 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int n,A,B,C,a;
int main() {
cin>>A>>B>>C;
int a%A==0;
if (a%B==C)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:14: error: expected initializer before '%' token
9 | int a%A==0;
| ^
|
s007008838 | p03731 | Java | import java.util.*;
import java.io.*;
public class A{
public static void main(String[] args) throws IOException,NumberFormatException{
try {
FastScanner sc=new FastScanner();
int n=sc.nextInt(),t=sc.nextInt();
int a[]=sc.readArray(n);
PrintWriter out=new PrintWriter(System.out);
long total=0;
for(int i... | Main.java:4: error: class A is public, should be declared in a file named A.java
public class A{
^
1 error
|
s214764386 | p03731 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
using ll = long long;
using ld = long double;
using namespace std;
int main() {
int N, T, X = 4;
cin >> N >> T;
vector<int>t(N), u(N - 1);
rep(i, N) {cin >> t.at(i);}
rep(i, N - 1) {u.at(i) = t.at(i + 1) - t.at(i);}
rep(i, N - 1) {
if ... | a.cc:7:1: error: extended character is not valid in an identifier
7 | int N, T, X = 4;
| ^
a.cc: In function 'int main()':
a.cc:7:1: error: '\U00003000int' was not declared in this scope
7 | int N, T, X = 4;
| ^~~~~
a.cc:8:10: error: 'N' was not declared in this scope
8 | cin >> N >> T;
... |
s262007501 | p03731 | C++ | #include<bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
using ll = long long;
using ull = unsigned long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP... | a.cc: In function 'int main()':
a.cc:57:11: error: 'asn' was not declared in this scope; did you mean 'ans'?
57 | cout << asn << endl;
| ^~~
| ans
|
s743345134 | p03731 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
int n,t,vec[200000],sum;
cin>>n>>t;
for(int i=0;i<n;i++){
cin>>vec[i];
}
for(int i=0;i<n-1;i++){
sum+=min(t,a[i+1]-a[i]);
}
cout<<sum+t<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:16: error: 'a' was not declared in this scope
10 | sum+=min(t,a[i+1]-a[i]);
| ^
|
s208583129 | p03731 | C++ | #include<bits/tdc++.h>
using namespace std;
int main(void){
int n,t,vec[200000],sum;
cin>>n>>t;
for(int i=0;i<n;i++){
cin>>vec[i];
}
for(int i=0;i<n-1;i++){
sum+=min(t,a[i+1]-a[i]);
}
cout<<sum+t<<endl;
return 0;
} | a.cc:1:9: fatal error: bits/tdc++.h: No such file or directory
1 | #include<bits/tdc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s843726329 | p03731 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n, t;
cin >> n >> t;
ll a[n];
for(int i=0; i<n; i++){
cin >> a[i];
}
ll ans = t;
for(int i=1; i<n; i++){
ans += min(t, a[i]-a[i-1];
}
cout << ans << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:15:30: error: expected ')' before ';' token
15 | ans += min(t, a[i]-a[i-1];
| ~ ^
| )
|
s086276720 | p03731 | C++ | #include "pch.h"
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, tt;
cin >> n >> tt;
long long ans = 0;
long long t,tim;
cin >> t;
ans = tt;
tim = tt;
for (long long i = 2; i <= n; i++) {
cin >> t;
if (tim > t) {
ans += tt - (tim - t);
tim = t + tt;
}
else {
ans +=... | a.cc:1:10: fatal error: pch.h: No such file or directory
1 | #include "pch.h"
| ^~~~~~~
compilation terminated.
|
s034557456 | p03731 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
int main()
{
ll n,t,a[200005],sum=0;z
cin>>n>>t;
for(ll i=0;i<n;i++)
{
cin>>a[i];
if(i)
{
if(a[i-1]+t<a[i])sum+=t;
else sum+=a[i]-a[i-1];
}
}
cout<<sum+t<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:32: error: 'z' was not declared in this scope
10 | ll n,t,a[200005],sum=0;z
| ^
|
s428634254 | p03731 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <map>
#include <iomanip>
typedef long long ll;
#define rep(i,a,b) for(int i=a;i<b;++i)
#define rrep(i,a,b) for(int i=a;i>=b;--i)
using namespace std;
using vi = vector<int>;
using vll = vector<ll>;
ll mod = 1e9 + 7;
... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s629645487 | p03731 | C++ | #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a ... | a.cc: In function 'int main()':
a.cc:69:31: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)'
69 | ans += T - max(0, t[i - 1] + T - t[i]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file inclu... |
s358518232 | p03731 | C++ | n, T = map(int, input().split())
t = list(map(int, input().split()))
ans = 0
for i in range(1, n):
ans += min(t[i]-t[i-1], T)
print(ans+T)
| a.cc:1:1: error: 'n' does not name a type
1 | n, T = map(int, input().split())
| ^
|
s800510343 | p03731 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cmath>
#include <cstdlib>
#include <climits>
using namespace std;
int main(){
long int n , t;
long int total = 0;
cin >> n >> t;
for(int i = 1; i <= n; ++i){
int s;
cin >> s;
total += s - r ... | a.cc: In function 'int main()':
a.cc:21:18: error: 'r' was not declared in this scope
21 | total += s - r < t ? s - r : t;
| ^
|
s216480695 | p03731 | C | #include <stdio.h>
int main (){
int i,a[200002],t,n;
scanf ("%d%d",&n,&t);
for (i=0;i<n;i++){
scanf ("%d",&a[i]);
}
for (i=0;i<n-1;i++){
if (a[i+1]-a[i]>t){
sum=sum+t;
}
else{
sum=sum+a[i+1]-a[i];
}
}
printf ("%d",sum+a[n-1]);
return 0;
} | main.c: In function 'main':
main.c:10:3: error: 'sum' undeclared (first use in this function)
10 | sum=sum+t;
| ^~~
main.c:10:3: note: each undeclared identifier is reported only once for each function it appears in
|
s138636917 | p03731 | C | #include <stdio.h>
int main (){
int i,a[200002],t,n;
scanf ("%d%d",&n,&t);
for (i=0;i<n;i++){
scanf ("%d",&a[i]);
}
a[n+1]=110000000;
for (i=0;i<n-1;i++){
if (a[i+1]-a[i]>t){
sum=sum+t;
}
else{
sum=sum+a[i+1]-a[i];
}
}
printf ("%d",sum);
return 0;
} | main.c: In function 'main':
main.c:11:3: error: 'sum' undeclared (first use in this function)
11 | sum=sum+t;
| ^~~
main.c:11:3: note: each undeclared identifier is reported only once for each function it appears in
|
s732727979 | p03731 | C | #include<stdio.h>
int main (){
int i,a[200002],t,n;
scanf ("%d%d",&n,&t);
for (i=0;i<n;i++){
scanf ("%d",&a[i]);
}
a[n+1]=110000000;
for (i=0;i<n-1;i++){
if (a[i+1]-a[i]>t){
sum=sum+t;
}
else{
sum=sum+a[i+1]-a[i];
}
}
return 0;
} | main.c: In function 'main':
main.c:11:3: error: 'sum' undeclared (first use in this function)
11 | sum=sum+t;
| ^~~
main.c:11:3: note: each undeclared identifier is reported only once for each function it appears in
|
s146008844 | p03731 | C++ | n, t = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
ans, tmp= 0, 0
a.each do |i|
ans += [t, i+t-tmp].min
tmp = i + t
end
p ans
| a.cc:1:1: error: 'n' does not name a type
1 | n, t = gets.split.map(&:to_i)
| ^
|
s322672786 | p03731 | C++ | #include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <cstring>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int MOD = 1000000007;
int main() {
int N, T; c... | a.cc: In function 'int main()':
a.cc:19:42: error: no matching function for call to 'min(ll, int&)'
19 | for(int i=N-2; i>=0; i++) result += min(t[i+1]-t[i], T);
| ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include... |
s011738754 | p03731 | C++ | #include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <cstring>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int MOD = 1000000007;
int main() {
int N, T; c... | a.cc: In function 'int main()':
a.cc:19:42: error: no matching function for call to 'min(ll, int&)'
19 | for(int i=N-2; i>=0; i++) result += min(t[i+1]-t[i], T)
| ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/... |
s640723429 | p03731 | C++ | def main():
n,t=map(int,input().split(' '))
human = list(map(int,input().split(' ')))
ans = t
for i in range(n-1):
if human[i+1]-human[i] >= t:
ans += t
else:
ans += human[i+1] - human[i]
print(ans)
if __name__ == '__main__':
main() | a.cc:11:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
11 | if __name__ == '__main__':
| ^~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
1 | def main():
| ^~~
|
s095387856 | p03731 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int N;
cin >> N;
long long int T;
cin >> T;
vector <long long int> A(N);
for(int i = 0; i < N; i++){
cin >> A[i];
}
long long int maxT = A[N-1] + T;
//maxTから空白期間を引いていく。
for(int i = 0; i < N; i++){
maxT -= min(A[i] -... | a.cc: In function 'int main()':
a.cc:20:14: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type, int)'
20 | maxT -= min(A[i] - T,0);
| ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
f... |
s935800112 | p03731 | C++ | int main() {
int N = 0;
int T = 0;
long long SUM = 0;
cin >> N >> T;
int previous = 0;
int now = 0;
int load = T;
for (int i = 0; i < N; i++) {
cin >> now;
if (load - now < 0) {
SUM += T;
load = now + T;
}
else {
SUM += now - previous;
}
previous = now;
}
SUM += T;
cout << SUM << endl;
... | a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
5 | cin >> N >> T;
| ^~~
a.cc:21:9: error: 'cout' was not declared in this scope
21 | cout << SUM << endl;
| ^~~~
a.cc:21:24: error: 'endl' was not declared in this scope
21 | ... |
s174561260 | p03731 | C | #inculde <stdio.h>
int main(){
int n,t,i,ans=0,time=0;
scanf("%d %d",&n,&t);
int str[n];
scanf("%d",str[0]);
time=str[0];
for(i=1;i<n-1;i++){
scanf("%d",&str[i]);
if(time + t >str[i] ){
ans=ans+(time + t - str[i]);
time=str[i];
}else{
time=str[i];
ans+=t;
}
ans+=t;
... | main.c:1:2: error: invalid preprocessing directive #inculde; did you mean #include?
1 | #inculde <stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | scanf("%d %d",&n,&t);
| ^~~~~
main.... |
s772451888 | p03731 | C++ | #include <iostream>
using namespace std;
using i64 = long long;
int main() {
i64 n, k;
cin >> n >> k;
i64 ans = 0;
i64 bfr;
cin >> bfr;
for(int i = 1;i < N;i++) {
i64 a;
cin >> a;
ans += min(a - bfr, k);
bfr = a;
}
cout << ans + k << endl;
} | a.cc: In function 'int main()':
a.cc:10:21: error: 'N' was not declared in this scope
10 | for(int i = 1;i < N;i++) {
| ^
|
s963379545 | p03731 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N, T;
cin >> N >> T
;
vector<int> t(N);
for(int i=0; i<N; i++){
cin >> t.at(i);
}
int ans=T;
for(int i=0; i<N-1; i++)
if(t.at(i+1)-t.at(i)>T) ans+=T;
else ans+=t.at(i+1)-t.at(i);
}
cout << ans << endl;
}
| a.cc:17:3: error: 'cout' does not name a type
17 | cout << ans << endl;
| ^~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
s428879427 | p03731 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n; cin>>n;
long long T,t[n],ans=T; cin>>T;
t[0]=0;
for(int i=1;i<n;i++){
cin>>t[i];
ans+=min(T,t[i]-t[i-1]);
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s421754973 | p03731 | C++ | #include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
#define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i)
#define repprev(i,a,b) for(ll i=b-1;i>=a;i--)
#define reprev(i,n) repprev(i,0,n)
using namespace std;
#define sz(x)... | a.cc:192:16: error: macro "rep" passed 3 arguments, but takes just 2
192 | rep(i, 0, N) scanf("%d", &t[i]);
| ^
a.cc:4:9: note: macro "rep" defined here
4 | #define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
| ^~~
a.cc: In function 'int main()':
a.cc:192:5: error: 're... |
s863125029 | p03731 | C++ | int main(){
int N,T;
cin>>N>>T;
int t=0,a=0;
ll ans=0;
cin>>t;
for(int i=1;i<N;i++){
if(t-a>T){
ans+=T;
}else{
ans+=t-a;
}
a=t;
}
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin>>N>>T;
| ^~~
a.cc:5:3: error: 'll' was not declared in this scope
5 | ll ans=0;
| ^~
a.cc:9:7: error: 'ans' was not declared in this scope
9 | ans+=T;
| ^~~
a.cc:11:7: error: '... |
s938691555 | p03731 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N,T;
int t[N];
cin >> N >> T;
for(int i=0; i<N; i++){
cin >> t[i];
}
long long ans = 0;
for(int i=0; i<N-1; i++){
if(t[i+1] - t[i] < T){
ans += (long long)([i+1] - t[i]);
}else{
ans += T;
}
}
cout << ans + T << en... | a.cc: In function 'int main()':
a.cc:13:28: error: expected ',' before '+' token
13 | ans += (long long)([i+1] - t[i]);
| ^
| ,
a.cc:13:28: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:13:32: error: expected '{' bef... |
s469416719 | p03731 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N,T;
int t[N];
cin >> N >> T;
for(int i=0; i<N; i++){
cin >> t[i];
}
long long ans = LL0;
for(int i=0; i<N-1; i++){
if(t[i+1] - t[i] < T){
ans += t[i+1] - t[i];
}else{
ans += T;
}
}
cout << ans + T << endl;
retu... | a.cc: In function 'int main()':
a.cc:10:19: error: 'LL0' was not declared in this scope
10 | long long ans = LL0;
| ^~~
|
s397522930 | p03731 | C++ | #include <iostream>
#include <map>
#include <vector>
#include <algorithm>
int main(){
int n, shower;
std::cin >> n >> shower;
int ans = 0;
std::vector<int> t(n);
std::cin >> t.at(0);
for(int i = 1; i < n; ++i){
std::cin >> t.at(i);
if(t.at(i) - t.at(i - 1) < shower){
... | a.cc: In function 'int main()':
a.cc:18:17: error: no match for 'operator+=' (operand types are 'int' and 'std::vector<int>')
18 | ans += t;
| ~~~~^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.