submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s068748215 | p03860 | C++ | a = map(str,raw_input().split())
#print a
#print a[1][0]
print a[0][0] + a[1][0] + a[2][0] | a.cc:2:2: error: invalid preprocessing directive #print
2 | #print a
| ^~~~~
a.cc:3:2: error: invalid preprocessing directive #print
3 | #print a[1][0]
| ^~~~~
a.cc:1:1: error: 'a' does not name a type
1 | a = map(str,raw_input().split())
| ^
|
s482305022 | p03860 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
String a = sc.next();
String b = sc.next();
String c = sc.next();
System.out.println(a.charAt(0),b.charAt(0)+c,charAt(0));
}
} | Main.java:10: error: cannot find symbol
System.out.println(a.charAt(0),b.charAt(0)+c,charAt(0));
^
symbol: method charAt(int)
location: class Main
1 error
|
s987213542 | p03860 | Java | import java.util.Scanner;
public class AtCoder01 {
public static void main(String[] args) {
System.out.println("コンテスト名を入力してください。");
Scanner scan = new Scanner(System.in);
String str = scan.nextLine();
String[] resultArray = str.split(" ");
String a = resultArray[0].substring(0,1);
String b = resu... | Main.java:2: error: class AtCoder01 is public, should be declared in a file named AtCoder01.java
public class AtCoder01 {
^
1 error
|
s952602645 | p03860 | C++ | #include<string.h>
using namespace std;
int main() {
long long a = 0, b = 0,ad = 0, x = 0, ans = 0;
cin >> a >> b >> x;
if ((a%x) == 0) {
ad = ad - 1;
}
ans = (b / x) - ad;
cout << abs(ans);
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
7 | cin >> a >> b >> x;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<string.h>
+++ |+#include <iostream>
... |
s753210111 | p03860 | C++ | a = input().split()
print("A%sC" % a[1][0])
| a.cc:1:1: error: 'a' does not name a type
1 | a = input().split()
| ^
|
s147913352 | p03860 | C++ | a, b, c = input().split()
print("A{0}C".format(b[0])) | a.cc:1:1: error: 'a' does not name a type
1 | a, b, c = input().split()
| ^
|
s609800142 | p03860 | C++ | l = raw_input().split()
print "A"+l[1][0]+"C" | a.cc:1:1: error: 'l' does not name a type
1 | l = raw_input().split()
| ^
|
s554060423 | p03860 | C++ | gets.chomp.split(" ").map{|s| s[0]}.each{|e| print e} | a.cc:1:1: error: 'gets' does not name a type
1 | gets.chomp.split(" ").map{|s| s[0]}.each{|e| print e}
| ^~~~
a.cc:1:36: error: expected unqualified-id before '.' token
1 | gets.chomp.split(" ").map{|s| s[0]}.each{|e| print e}
| ^
|
s080518768 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
cin>>s;
cout<<A;
cout<<s[0];
cout<<C;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:7: error: 'A' was not declared in this scope
7 | cout<<A;
| ^
a.cc:9:7: error: 'C' was not declared in this scope
9 | cout<<C;
| ^
|
s382036146 | p03860 | C++ | <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
cin>>s;
cout<<A;
cout<<s[0];
cout<<C;
return 0;
} | a.cc:1:1: error: expected unqualified-id before '<' token
1 | <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:4:1: error: 'string' was not declared in this scope
4 | string s;
| ^~~~~~
a.cc:5:1: error: 'cin' was not declared in this scope
5 | cin>>s;
| ^~~
a.cc:5:6: error: 's' was... |
s968295212 | p03860 | C++ | a = list(input().split())
print (a[0][0] + a[1][0] + a[2][0])
| a.cc:1:1: error: 'a' does not name a type
1 | a = list(input().split())
| ^
|
s119436367 | p03860 | C++ | print("A"+input().split()[1][0]+"C") | a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token
1 | print("A"+input().split()[1][0]+"C")
| ^
|
s896049305 | p03860 | C++ | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
cin >> s;
cout << "A" + s[0] + "C" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:20: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
7 | cout << "A" + s[0] + "C" << endl;
| ^ ~~~
| |
| const char [2]
|
s676650789 | p03860 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s,c;
cin >> s >> c >> s;
cout << A<< c[0] <<C << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'A' was not declared in this scope
6 | cout << A<< c[0] <<C << endl;
| ^
a.cc:6:20: error: 'C' was not declared in this scope
6 | cout << A<< c[0] <<C << endl;
| ^
|
s316484935 | p03860 | C++ | Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of le... | a.cc:1:1: error: 'Snuke' does not name a type
1 | Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.
| ^~~~~
|
s932712505 | p03860 | C++ | Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.
| a.cc:1:1: error: 'Snuke' does not name a type
1 | Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.
| ^~~~~
|
s934469576 | p03860 | C++ | oing to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.
Snuke has decided to abbreviate the name of the contest as "AxC". Here, x is the uppercase Engl... | a.cc:1:1: error: 'oing' does not name a type
1 | oing to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.
| ^~~~
|
s838098844 | p03860 | C++ | 3 ≤ |s| ≤ 10^5
s consists of lowercase English letters.
No two neighboring characters in s are equal.
Input
The input is given from Standard Input in the following format:
s | a.cc:1:3: error: extended character ≤ is not valid in an identifier
1 | 3 ≤ |s| ≤ 10^5
| ^
a.cc:1:9: error: extended character ≤ is not valid in an identifier
1 | 3 ≤ |s| ≤ 10^5
| ^
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3 ≤ |s| ≤ 10^5
| ^
|
s154334641 | p03860 | C++ | Takahashi and Aoki will play a game against each other. The two players alternately performs the following operation, Takahashi going first:
Remove one of the characters in s, excluding both ends. However, a character cannot be removed if removal of the character would result in two neighboring equal characters in s.
... | a.cc:1:1: error: 'Takahashi' does not name a type
1 | Takahashi and Aoki will play a game against each other. The two players alternately performs the following operation, Takahashi going first:
| ^~~~~~~~~
|
s072991504 | p03860 | C++ | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String A = sc.next();
String s = sc.next();
String C = sc.next();
System.out.println("A"+(String.valueOf(s.charAt(0)))+"C");
}
}
| 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:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s071408319 | p03860 | C++ | #include <studio.h>
int main(void){
char a[100], b;
return 0;
} | a.cc:1:10: fatal error: studio.h: No such file or directory
1 | #include <studio.h>
| ^~~~~~~~~~
compilation terminated.
|
s621801825 | p03860 | C | #include <stdio.h>
int main(void) {
char str1[100],str2[100],str3[100];
scanf("%s %s %s",str1,str2,str3);
printf("%s %s %s\n",str1[0],str2[0],str[0]);
return 0;
} | main.c: In function 'main':
main.c:9:41: error: 'str' undeclared (first use in this function); did you mean 'str3'?
9 | printf("%s %s %s\n",str1[0],str2[0],str[0]);
| ^~~
| str3
main.c:9:41: note: each undeclared identif... |
s001767098 | p03860 | C++ | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main (int argc,char* argv[])
{
int i=0;
char s[100];
gets(s);
while(s[i]){
if(i==0)
printf("%c",s[i]);
if(s[i] ==' ')
printf("%c",s[i+1]);
i++;
}
return 0;
}
| a.cc: In function 'int main(int, char**)':
a.cc:9:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(s);
| ^~~~
| getw
|
s053833085 | p03860 | C | File Edit Options Buffers Tools C Help
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main (int argc,char* argv[])
{
int i;
char s[100];
gets(s);
for(i=0;i<=100;i++){
if(i==0)
printf("%c",s[i]);
if(s[i] == ' ')
printf("%c",s[i+1]);
}
return 0;
}
| main.c:1:1: error: unknown type name 'File'
1 | File Edit Options Buffers Tools C Help
| ^~~~
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Options'
1 | File Edit Options Buffers Tools C Help
| ^~~~~~~
main.c:1:11: error: unknown type name 'Options'
In file i... |
s434956532 | p03860 | C++ | s = gets.split
puts s[0][0] + s[1][0] + s[2][0]
| a.cc:1:1: error: 's' does not name a type
1 | s = gets.split
| ^
|
s260679835 | p03860 | C++ | #include <iostream>
using namespace std;
#include <vector>
#include <stdio.h>
#include <algorithm>
#define _USE_MATH_DEFINES
#include <math.h>
#include <string>
#include <cstdlib>
int main() {
string a;
char temp
for(int i = 0; i < 2; i++) {
cin >> a;
if(i == 1) {
temp = a[0];
}
}
cout << "A" << temp << ... | a.cc: In function 'int main()':
a.cc:14:9: error: expected initializer before 'for'
14 | for(int i = 0; i < 2; i++) {
| ^~~
a.cc:14:24: error: 'i' was not declared in this scope
14 | for(int i = 0; i < 2; i++) {
| ^
a.cc:20:24: error: 'temp' was not decla... |
s613390533 | p03860 | C++ | #include <iostream>
using namespace std;
#include <vector>
#include <stdio.h>
#include <algorithm>
#define _USE_MATH_DEFINES
#include <math.h>
#include <string>
#include <cstdlib>
int main() {
string a;
for(int i = 0; i < 2; i++) {
cin >> a;
if(i == 1) {
temp = a[0];
}
}
cout << "A" << temp << "C";
retur... | a.cc: In function 'int main()':
a.cc:16:25: error: 'temp' was not declared in this scope; did you mean 'tm'?
16 | temp = a[0];
| ^~~~
| tm
a.cc:19:24: error: 'temp' was not declared in this scope; did you mean 'tm'?
19 | c... |
s433626319 | p03860 | C++ | #include <iostream>
using namespace std;
#include <vector>
#include <stdio.h>
#include <algorithm>
#define _USE_MATH_DEFINES
#include <math.h>
#include <string>
#include <cstdlib>
int main() {
string a;
for(int i = 0; i < 2; i++) {
cin >> a
if(i == 1) {
temp = a[0];
}
}
cout << "A" << temp << "C"
} | a.cc: In function 'int main()':
a.cc:14:25: error: expected ';' before 'if'
14 | cin >> a
| ^
| ;
15 | if(i == 1) {
| ~~
a.cc:19:24: error: 'temp' was not declared in this scope; did you mean '... |
s337574349 | p03860 | C++ | #include<bits/stdc++.h>
#include<string.h>
using namespace std;
main()
{
int i=0;
char a[101];
gets(a);
while(a[i]!=' ')
i++;
cout<<"A"<<a[i+1]<<"C";
} | a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(a);
| ^~~~
| getw
|
s738638083 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
main()
{
int i=0;
char a[101];
gets(a);
while(a[i]!=' ')
i++;
cout<<"A"<<a[i+1]<<"C";
} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(a);
| ^~~~
| getw
|
s636992416 | p03860 | C++ | #include <stdio.h>
int main(){
long long int a,b,x;
scanf("%11d,%11d,%11d",&&a,&&b,&&x);
long long int A = [a/x];
long long int B = [b/x];
long long int ans = B-A;
printf("%11d",ans);
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:21: error: expected ',' before '/' token
5 | long long int A = [a/x];
| ^
| ,
a.cc:5:21: error: expected identifier before '/' token
a.cc: In lambda function:
a.cc:5:24: error: expected '{' before ';' token
5 | long long ... |
s584878651 | p03860 | C++ | #include <stdio.h>
int main(){
long long int a,b,x;
scanf("%11D,%11d,%11d",&&a,&&b,&&x);
long long int A = [a/x];
long long int B = [b/x];
long long int ans = B-A;
printf("%11d",ans);
return 0;
} | a.cc: In function 'int main()':
a.cc:6:21: error: expected ',' before '/' token
6 | long long int A = [a/x];
| ^
| ,
a.cc:6:21: error: expected identifier before '/' token
a.cc: In lambda function:
a.cc:6:24: error: expected '{' before ';' token
6 | long long ... |
s576074340 | p03860 | C++ | #include <stdio.h>
int main(){
long long int a,b,x;
scanf("%11d,%11d,%11d",&&a,&&b,&&c);
long long int A = [a/x];
long long int B = [b/x];
long long int ans = B-A;
printf("%11d,ans);
return 0;
} | a.cc:9:8: warning: missing terminating " character
9 | printf("%11d,ans);
| ^
a.cc:9:8: error: missing terminating " character
9 | printf("%11d,ans);
| ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:21: error: expected ',' before '/' token
6 | long long int A = [a/x];
| ... |
s008560821 | p03860 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.math.*;
public class Main {
public static void main(String[] args)throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new Strin... | Main.java:12: error: incompatible types: String cannot be converted to char
char c = str[1].substring(0);
^
1 error
|
s535659296 | p03860 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.math.*;
public class Main {
public static void main(String[] args)throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new Strin... | Main.java:12: error: cannot find symbol
Char c = str[1].substring(0);
^
symbol: class Char
location: class Main
1 error
|
s444744160 | p03860 | C | #include<stdio.h>
int main(){
char s1[100];
char s2[100;
char s3[100;
scanf("%s %s %s",s1,s2,s3);
printf("%c%c%c\n",s1[0],s2[0],s3[0]);
} | main.c: In function 'main':
main.c:4:16: error: expected ']' before ';' token
4 | char s2[100;
| ^
| ]
main.c:12:1: error: expected declaration or statement at end of input
12 | }
| ^
|
s825034209 | p03860 | C++ | #include <cstdio>
#include <cstring>
int main(void) {
char s[200];
gets(s);
printf("A%cC\n", s[8]);
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
|
s038617141 | p03860 | Java | public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String chaineCaractere = scan.nextLine();
String[] motChaine = chaineCaractere.split(" ");
String raccourciChaine = "";
for (int i = 0; i < motChaine.length; i++){
raccourciChaine = raccourciChain... | Main.java:1: 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)
1 error
|
s821056564 | p03860 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args){
Scanner stdIn=new Scanner(System.in);
String a=stdIn.next();
String b=stdIn.next();
String c=stdIn.next();
System.out.print("A"+b.charAt(0)+"C");
}
} | Main.java:2: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s326407827 | p03860 | C++ | #include <stdio.h>
#include <string.h>
int main()
{
int i;
char a[10000];
gets(a);
if(a[0]<='Z'&&a[0]>='A')printf("%c",a[0]);
for(i=0; i<strlen(a); i++)
if(a[i]==' '&&a[i+1]<='Z'&&a[i+1]>='A')printf("%c",a[i+1]);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(a);
| ^~~~
| getw
|
s770359157 | p03860 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args){
Scanner stdIn=new Scanner(System.in);
String a=stdIn.next();
String b=stdIn.next();
String c=stdIn.next();
System.out.print("A"+b.charAt(0)+"C");
}
} | Main.java:2: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s260624576 | p03860 | C++ | # include <stdio.h>
# include <string.h>
# include <stdlib.h>
# include <iostream>
# include <vector>
# include <queue>
# include <stack>
# include <map>
# include <time.h>
# include <math.h>
# include <algorithm>
using namespace std;
# define lowbit(x) ((x)&(-x))
# define pi acos(-1.0)
# define MAXN 250
# define eps 1... | a.cc: In function 'int main()':
a.cc:33:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
33 | gets(a);
| ^~~~
| getw
|
s112759211 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char s[200],ch;
while(gets(s)){
ch=s[8];
cout<<"A"<<ch<<"C"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:11: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | while(gets(s)){
| ^~~~
| getw
|
s243152827 | p03860 | C++ | #include <string>
#include <iostream>
int main(){
string second;
string tmp;
for (int i = 0; i < 3; i++) {
if (i == 1) cin >> second;
else cin >> tmp;
}
cout << second << endl;
cout << "A" << second[0] << "C";
return 0;
} | a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
5 | string second;
| ^~~~~~
a.cc:5:1: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
7... |
s510954038 | p03860 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char s[200],ch;
gets(s);
ch=s[8];
cout<<"A"<<ch<<"C"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(s);
| ^~~~
| getw
|
s254387503 | p03860 | C++ | #include <stdio.h>
#include <ctype.h>
#include <string.h>
int main()
{
char szLine[200];
gets(szLine);
char* p = strchr(szLine, ' ');
p++;
char cUp = toupper(*p);
printf("A%cC", cUp);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(szLine);
| ^~~~
| getw
|
s843019896 | p03860 | C++ | #include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;
char a[111];
int main()
{
gets(a);
// while()
{
int flag=0;
for(int i=0;i<strlen(a);i++)
{
if(a[i]>='A'&&a[i]<='Z'&&!flag) {cout<<a[i];flag=1;}
if(a[i]==' ') flag=0;
}
}
... | a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(a);
| ^~~~
| getw
|
s743668645 | p03860 | C++ | #include <iostream>
int main() {
__int64 a, b, x;
std::cin >> a >> b >> x;
int ans = (b - a) / x;
if (b%x == 0) {
ans++;
}
std::cout << ans << std::endl;
//system("pause");
} | a.cc: In function 'int main()':
a.cc:4:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
4 | __int64 a, b, x;
| ^~~~~~~
| __int64_t
a.cc:5:21: error: 'a' was not declared in this scope
5 | std::cin >> a >> b >> x;
| ... |
s235771206 | p03860 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
#include <string.h>
#include <queue>
#include <stack>
#include <algorithm>
#include <fstream>
#define ll long long
#define INF 0x3f3f3f3f
#define clr(x) memset(x,0,sizeof(x))
#define clr2(x) memset(x,INF,sizeof(x))
#define clr3(x) memset(x,-INF,sizeof(x))
#define ... | a.cc: In function 'void solve()':
a.cc:25:4: error: 'gets' was not declared in this scope; did you mean 'getw'?
25 | gets(s);
| ^~~~
| getw
|
s422307075 | p03860 | C++ | #include <stdio.h>
char s[101];
int main()
{
gets(s);
int i=0, cnt=0;
while(s[i]!='\0' && cnt<1)
{
if(s[i+1]==32){ i ++; cnt++; }
i++;
}
printf("A%cC\n", s[i]);
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
| getw
|
s187990931 | p03860 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
#include <string.h>
#include <queue>
#include <stack>
#include <algorithm>
#include <fstream>
#define ll long long
#define INF 0x3f3f3f3f
#define clr(x) memset(x,0,sizeof(x))
#define clr2(x) memset(x,INF,sizeof(x))
#define clr3(x) memset(x,-INF,sizeof(x))
#define ... | a.cc: In function 'void solve()':
a.cc:25:4: error: 'gets' was not declared in this scope; did you mean 'getw'?
25 | gets(s);
| ^~~~
| getw
|
s181376624 | p03860 | Java | import java.util.Scanner;
/**
* @Author oreid
* @Release 04/12/2016
*/
public class MainA1 {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
scanner.next();
String x = scanner.next();
scanner.close();
System.out.println("A"+ x.charAt(0)... | Main.java:7: error: class MainA1 is public, should be declared in a file named MainA1.java
public class MainA1 {
^
1 error
|
s363762529 | p03860 | Java | import java.io.*;
import java.util.*;
public class A {
public static void main(String[] args) throws Exception {
BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(System.out);
Scanner s = new Scanner(System.in);
String[] split = f.readLine().split("\... | Main.java:4: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s884288469 | p03860 | C++ | # include <bits/stdc++.h>
# define maxn 300003
# define ll long long
# define clock (clock() * 1000.0 / CLOCKS_PER_SEC)
# define rc(s) return cout << s,0
# define _ ios_base::sync_with_stdio(false);cin.tie(0);
# define pb push_back
# define mp make_pair
using namespace std;
int main(){_
string s1,s2,s3;
cin >>... | a.cc: In function 'int main()':
a.cc:14:28: error: 's' was not declared in this scope; did you mean 's3'?
14 | cout << s1 << s2[0] << s[3];
| ^
| s3
|
s066052595 | p03861 | C++ | 1 1000000000000000000 3 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1 1000000000000000000 3
| ^
|
s685910735 | p03861 | Java |
import java.util.*;
public class ccc {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int a, b, c;
int count = 0;
a = input.nextInt();
b = input.nextInt();
c = input.nextInt();
for (int i = a; b >= i; i++) {
in... | Main.java:4: error: class ccc is public, should be declared in a file named ccc.java
public class ccc {
^
1 error
|
s764146659 | p03861 | C++ | #include<iostream>
#include<cmath>
using namespace std;
long long a, b, x;
int main() {
cin >> a >> b >> x;
long long ans = (b / x) - max(0, ((a-1) / x));
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:34: error: no matching function for call to 'max(int, long long int)'
10 | long long ans = (b / x) - max(0, ((a-1) / x));
| ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/1... |
s863609429 | p03861 | C | #include <iostream>
#include <stdio.h>
using namespace std;
typedef long long ll;
int main() {
ll a, b, x;
cin >> a >> b >> x;
ll b_num = b / x;
ll a_num = (a - 1) >= 0 ? (a - 1) / x : -1;
printf("%lld\n", b_num - a_num);
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s774648049 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
#define M 1000000007
long long int power(int a,int b)
{
if(b==0)
return 1;
long long int k=power(a,b/2);
if(b%2==0)
return ((k%M)*(k%M))%M;
else
return ((k%M)*(k%M)*(a%M))%M;
}
int main()
{
ios_base::sync_with_stdio(false);
ci... | a.cc: In function 'int main()':
a.cc:27:15: error: redeclaration of 'long long int ans'
27 | long long int ans=ans/x;
| ^~~
a.cc:26:15: note: 'long long int ans' previously declared here
26 | long long int ans= (b-a);
| ^~~
|
s779791391 | p03861 | C++ | #include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long ll;
/* clang-format off */
#define MOD 1000000007
#define INF 1000000000000000000ll
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define ALL(a) (a).begin(), (a).end()
//#define __DEBUG__... | a.cc:3:10: fatal error: atcoder/all: No such file or directory
3 | #include <atcoder/all>
| ^~~~~~~~~~~~~
compilation terminated.
|
s916960590 | p03861 | C++ | using namespace std;
int main() {
long long a, b, x;
cin >> a >> b >> x;
if (a > 0) cout << b / x - (a - 1) / x << endl;
else cout << b / x << endl;
}
| a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin >> a >> b >> x;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:6:14: err... |
s690657041 | p03861 | C++ | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int main() {
int64_t A, B, C;
cin >> A >> B >> C
if(A % C == 0) {
cout << A / C - B / C + 1 << endl;
}
... | a.cc: In function 'int main()':
a.cc:9:21: error: expected ';' before 'if'
9 | cin >> A >> B >> C
| ^
| ;
10 | if(A % C == 0) {
| ~~
a.cc:13:3: error: 'else' without a previous 'if'
13 | else {
| ^~~~
|
s257987633 | p03861 | C++ | a, b, x = map(int, input().split())
total1 = 0
for i in range (a, b+1):
if i % x == 0:
total1 += 1
print(total1) | a.cc:1:1: error: 'a' does not name a type
1 | a, b, x = map(int, input().split())
| ^
|
s820208658 | p03861 | C++ | a,b,x=map(int,input().split())
cnt=0
c=a//x
d=b//x
print(int(d-c)) | a.cc:1:1: error: 'a' does not name a type
1 | a,b,x=map(int,input().split())
| ^
|
s867903497 | p03861 | C++ | #include<stdio.h>
int main(void)
{
int a,b,c,i,x;
sacnf("%d%d%d",&a,&b,&x);
c=0;
for(i=a;i<=b;i++) if(i%x==0) c+=1;
printf("%d\n",c);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'sacnf' was not declared in this scope; did you mean 'scanf'?
7 | sacnf("%d%d%d",&a,&b,&x);
| ^~~~~
| scanf
|
s284416019 | p03861 | C++ | #include<stdio.h>
int main(void)
{
int a,b,c,i,x;
sacnf("%d%d%d",&a,&b,&x);
c=0;
for(i=a;i<=b;i++) if(i%x=0) c+=1;
printf("%d\n",c);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'sacnf' was not declared in this scope; did you mean 'scanf'?
7 | sacnf("%d%d%d",&a,&b,&x);
| ^~~~~
| scanf
a.cc:9:25: error: lvalue required as left operand of assignment
9 | for(i=a;i<=b;i++) if(i%x=0) c+=1;
| ~^... |
s179201888 | p03861 | C++ | #include<stdio.h>
int main(void)
{
int a,b,c,i,x;
sacnf("%d%d%d",&a,&b,&x);
c=0;
for(i=a;i<=b,i++) if(i%x=0) c+=1;
printf("%d\n",c);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'sacnf' was not declared in this scope; did you mean 'scanf'?
7 | sacnf("%d%d%d",&a,&b,&x);
| ^~~~~
| scanf
a.cc:9:19: error: expected ';' before ')' token
9 | for(i=a;i<=b,i++) if(i%x=0) c+=1;
| ^
| ... |
s247838880 | p03861 | C++ | #include<stdio.h>
int main(void)
{
int a,b,c,i;
sacnf("%d%d%d",&a,&b,&x);
c=0;
for(i=a;i<=b,i++) if(i%x=0) c+=1;
printf("%d\n",c);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:25: error: 'x' was not declared in this scope
7 | sacnf("%d%d%d",&a,&b,&x);
| ^
a.cc:7:3: error: 'sacnf' was not declared in this scope; did you mean 'scanf'?
7 | sacnf("%d%d%d",&a,&b,&x);
| ^~~~~
| scanf
a.cc:9:19: error: ... |
s322099451 | p03861 | C++ | # cook your dish here
li=list(map(int,input().split()))
if li[0]==li[1]:
k=int(li[0]//li[2])
if k*li[2]==li[0]:
print(1)
else:
print(0)
elif li[0]<li[2]:
if li[0]==0:
print(li[1]//li[2]+1)
else:
print(li[1]//li[2])
else:
print((li[1]//li[2])-(li[0]//li[2])+1) | a.cc:1:3: error: invalid preprocessing directive #cook
1 | # cook your dish here
| ^~~~
a.cc:3:1: error: 'li' does not name a type
3 | li=list(map(int,input().split()))
| ^~
|
s233928254 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int64_t a,b,x;
cin >> a >> b >> x;
int64_t asum = a / x;
if( (a % x) == 0){
asum++;
}
int64_t bsum = b / x;
cout << ssum - bsum << endl;
} | a.cc: In function 'int main()':
a.cc:15:11: error: 'ssum' was not declared in this scope; did you mean 'bsum'?
15 | cout << ssum - bsum << endl;
| ^~~~
| bsum
|
s053449473 | p03861 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
using ll = long long;
const int INF = 1001001001;
const ll INF_LL = 1001001001001001001LL;
void solver(ll a,ll b,ll x){
ll ans = b/x;
ans -= a/x;
cout << ans2 << endl;
}
int main(void){
ll a,b,x; cin >> a >> b >> x;
... | a.cc: In function 'void solver(ll, ll, ll)':
a.cc:13:11: error: 'ans2' was not declared in this scope; did you mean 'ans'?
13 | cout << ans2 << endl;
| ^~~~
| ans
|
s295195795 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
ll int a,b,x,c=0;
cin>>a>>b>>x;
b=b/x + 1;
if(a!=0)
a=(a-1)/x + 1;
cout<<(b-a)<<endl;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'll' was not declared in this scope
5 | ll int a,b,x,c=0;
| ^~
a.cc:6:14: error: 'a' was not declared in this scope
6 | cin>>a>>b>>x;
| ^
a.cc:6:17: error: 'b' was not declared in this scope
6 | cin>>a>... |
s783863996 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
ll int a,b,x,c=0;
cin>>a>>b>>x;
for(ll int i=a;i<=b;i++){
if(i%x==0)
c++;
}
cout<<c<<endl;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'll' was not declared in this scope
5 | ll int a,b,x,c=0;
| ^~
a.cc:6:14: error: 'a' was not declared in this scope
6 | cin>>a>>b>>x;
| ^
a.cc:6:17: error: 'b' was not declared in this scope
6 | cin>>a>... |
s109493091 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
ll a, b, x;
cin >> a >> b >> x;
cout << (b / x - max(a - 1, 0) / x) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:25: error: no matching function for call to 'max(ll, int)'
8 | cout << (b / x - max(a - 1, 0) / x) << endl;
| ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/st... |
s376222058 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dump(...)
#endif
#define endl '\n'
#define ll long long
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, x) for (int i = 0; i < (int)(x); i++)
#define REPS(i, x) for (int i = 1; i <= (int)(x); i++)
#... | a.cc: In function 'int main()':
a.cc:73:24: error: no matching function for call to 'max(long long int, int)'
73 | cout << B / X - max((A - 1), 0) / X << endl;
| ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c... |
s860185776 | p03861 | C++ | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
ll calc(ll n, ll x) {
return (n / x);
}
int main() {
ll a, b, x; cin >> a >> b >> x;
ll ans = calc(b, x) - calc(max(a-1, 0), x);
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:12:35: error: no matching function for call to 'max(ll, int)'
12 | ll ans = calc(b, x) - calc(max(a-1, 0), x);
| ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14... |
s216491430 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
long long division(long long n, long long x){
if(n==0){
return 0;
}else if(n!=0{
return x/n;
}
}
int main(){
long long a,b,x;
cin>>a>>b>>x;
if(a==0){
cout<<division(b,x);
}else{
cout<<division(b,x)-division(a-1,x)<<en... | a.cc: In function 'long long int division(long long int, long long int)':
a.cc:6:18: error: expected ')' before '{' token
6 | }else if(n!=0{
| ~ ^
| )
a.cc:10:1: error: expected primary-expression before '}' token
10 | }
| ^
a.cc:10:1: warning: control reache... |
s699501457 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
long long division(long long n, long long x){
if(n==0){
return 0;
}else if(n!=0{
return x/n;
}
}
int main(){
long long a,b,x;
cin>>a>>b>>x;
if(a=0){
cout<<division(b,x);
}else{
cout<<division(b,x)-division(a-1,x)<<end... | a.cc: In function 'long long int division(long long int, long long int)':
a.cc:6:18: error: expected ')' before '{' token
6 | }else if(n!=0{
| ~ ^
| )
a.cc:10:1: error: expected primary-expression before '}' token
10 | }
| ^
a.cc:10:1: warning: control reache... |
s737174342 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int divi(int i,int j) {
int x=i/j;
return x;
}
int main() {
int a, b, x;
cin >> a >> b>> x;
int y=O;
if (a<=0) y=divi(b,x)-divi(a-1,x);
else y=divi(b,x);
cout << y << endl;
}
| a.cc: In function 'int main()':
a.cc:12:9: error: 'O' was not declared in this scope
12 | int y=O;
| ^
|
s595923261 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int divi(int i,int j) {
int x=i/j;
return x;
}
int main() {
int a, b, x;
cin >> a >> b>> x;
y=divi(b,x)-divi(a-1,x);
cout << y << endl;
}
| a.cc: In function 'int main()':
a.cc:12:3: error: 'y' was not declared in this scope
12 | y=divi(b,x)-divi(a-1,x);
| ^
|
s982651356 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int div(int i,int j) {
int x=i/j;
return x;
}
int main() {
int a, b, x;
cin >> a >> b>> x;
y=div(b,x)-div(a-1,x);
cout << y << endl;
}
| a.cc:4:5: error: ambiguating new declaration of 'int div(int, int)'
4 | int div(int i,int j) {
| ^~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
from a.cc:1:
/usr/include/stdlib.h:992:14: note: old decl... |
s131401669 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, x;
cin >> a >> b>> x;
int counter=0;
for (int i=a;i<=b;i++) {
if (i%x==o) {
counter++;
}
}
cout << counter << endl;
}
| a.cc: In function 'int main()':
a.cc:9:14: error: 'o' was not declared in this scope
9 | if (i%x==o) {
| ^
|
s606275609 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, x;
cin >> a >> b>> x;
int counter=0;
for (int i=a;i<=b;i++) {
if (i%x==o) {
count++;
}
}
cout << counter << endl;
} | a.cc: In function 'int main()':
a.cc:9:14: error: 'o' was not declared in this scope
9 | if (i%x==o) {
| ^
a.cc:10:12: error: no post-increment operator for type
10 | count++;
| ^~
|
s847343439 | p03861 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
long n = in.nextLong();
long x = in.nextLong();
long[] a = new long[n];
for (int i = 0; i < n; i++) {
a[i] = in.nextLong();
}
... | Main.java:9: error: incompatible types: possible lossy conversion from long to int
long[] a = new long[n];
^
1 error
|
s640492389 | p03861 | C++ | #include <iostream>
using namespace std;
void solve(){
long long a, b, x; cin >> a >> b >> x;
if(x == 1) {
cout << b-a+1 << endl;
return 0;
}
long long total = b/x+1;//0-bまでで割り切れるもの
long long totala = (a-1)/x+1;//0~a-1までで割り切れるもの
cout << total-totala << endl;
}
int main(){
solve(... | a.cc: In function 'void solve()':
a.cc:8:14: error: return-statement with a value, in function returning 'void' [-fpermissive]
8 | return 0;
| ^
|
s572856953 | p03861 | C++ | #include <iostream>
using namespace std;
int main()
{
long long a, b, x;
cin >> a >> b >> x;
if(x == 1) {
cout << b-a+1 << endl;
return;
}
long long z = b/x;
long long y = (a-1)/x;
if(a == 0) y == -1;
cout << z-y<< endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
10 | return;
| ^~~~~~
|
s273065042 | p03861 | C++ | #include <iostream>
using namespace std;
int main()
{
long long a, b, x;
cin >> a >> b >> x;
if(x == 1) {
cout << b-a+1 << endl;
return ;
}
long long z = b/x;
long long y = (a-1)/x;
if(a == 0) y == -1;
cout << z-y<< endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
10 | return ;
| ^~~~~~
|
s417115555 | p03861 | C++ | #include <iostream>
using namespace std;
int main(){
long long a,b,x;
long long n;
cin>>a>>b>>x;
if(b-a+1<x){
n=(b-a)/x+1
if (b%x==0){
n=1;
}
else if(a%x==0){
n=1;
}
}
cout<<n;
} | a.cc: In function 'int main()':
a.cc:8:28: error: expected ';' before 'if'
8 | n=(b-a)/x+1
| ^
| ;
9 | if (b%x==0){
| ~~
a.cc:12:17: error: expected '}' before 'else'
12 | ... |
s679674821 | p03861 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main (){
long long a, b, x;
cin >> a >> b >> x;
long long sol = (b - a) / x;
/*
if (a % x == 0 || b % x == 0){
sol ++;
} else if (a % x != 0 && b % x != 0 && (b - a) % x != 0){
sol = round((b - a) / x);
}
*/
if (a % x == 0 && b % x=... | a.cc: In function 'int main()':
a.cc:16:27: error: expected primary-expression before '!=' token
16 | if (a % x == 0 && b % x=!= 0 && (b - a) % x == 0){
| ^~
|
s735517793 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
long long a,b,x;
cin >> a >> b >> x;
/*
for(long long i=a; i<=b; i++){
if( i % x == 0){
count++;
}
}
*/
long long pivot = a, ans=0;
while(true){
if(pivot%x==0){
long long diff = b-pivot;
... | a.cc: In function 'int main()':
a.cc:19:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
19 | return;
| ^~~~~~
a.cc:24:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
24 | return;
| ... |
s747472664 | p03861 | C++ | #include<iostream>
using namespace std;
int main(){
long long a,b,x,count=0;
cin >> a >> b >> x;
/*
for(long long i=a; i<=b; i++){
if( i % x == 0){
count++;
}
}
*/
long long pivot = a, ans=0;
while(true){
if(pivot%x==0){
long long diff = b... | a.cc: In function 'int main()':
a.cc:19:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
19 | return;
| ^~~~~~
a.cc:24:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
24 | return;
| ... |
s051913567 | p03861 | C++ | #include <iostream>
using namespace std;
int main() {
longlong a,b,x;
cin>>a>>b>>x;
int y=0;
for(int i=0;i<b-a+1;i++){
if((a+i)%x==0){
y+=1;
}
}
cout<<y;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'longlong' was not declared in this scope
5 | longlong a,b,x;
| ^~~~~~~~
a.cc:6:14: error: 'a' was not declared in this scope
6 | cin>>a>>b>>x;
| ^
a.cc:6:17: error: 'b' was not declared in this scope
6 | ... |
s449983429 | p03861 | C++ | #include <iostream>
using namespace std;
int main() {
longlong a,b,x;
cin>>a>>b>>x;
int y=0;
for(int i=0;i<b-a+1;i++){
if(a%x==0){
y+=1;
}
}
cout<<y;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'longlong' was not declared in this scope
5 | longlong a,b,x;
| ^~~~~~~~
a.cc:6:14: error: 'a' was not declared in this scope
6 | cin>>a>>b>>x;
| ^
a.cc:6:17: error: 'b' was not declared in this scope
6 | ... |
s260325529 | p03861 | C++ | #include <iostream>
using namespace std;
int main() {
longlong a,b,x;
cin<<a<<b<<x;
int y=0;
for(int i=0;i<b-a+1;i++){
if(a%x==0){
y+=1;
}
}
cout<<y;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'longlong' was not declared in this scope
5 | longlong a,b,x;
| ^~~~~~~~
a.cc:6:14: error: 'a' was not declared in this scope
6 | cin<<a<<b<<x;
| ^
a.cc:6:17: error: 'b' was not declared in this scope
6 | ... |
s412090278 | p03861 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define ar array
#define vt vector
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define sz(x) (int)(x).size()
#define F_OR(i, a, b, s) for (int i=(a); (s)>0?i<(b):i>(b); i+=(s))
#define F_OR1(e) F_OR(i, 0, e, 1)
#define F_OR2(i, e) F_OR... | a.cc: In function 'void solve()':
a.cc:158:21: error: 'c' was not declared in this scope
158 | if (a % x == 0) c++;
| ^
a.cc:159:11: error: 'c' was not declared in this scope
159 | print(c);
| ^
|
s400179334 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<vector<int>> Graph;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
#define pi 3.14159265359
#define inf 2147483647
#define INF 9223372036854775807
#define mod 1000000007
#define mod2 998244353
... | a.cc: In function 'int main()':
a.cc:19:31: error: 'f' was not declared in this scope
19 | if(a % x == 0) left--;f
| ^
|
s676253580 | p03861 | C++ | #include <bits/stdc++.h>
using namespace std;
#define PI 3.141592653589793
#define MOD 1000000007
typedef long long ll;
typedef long double ld;
int main() {
ll a,b,x;
cin >> a >> b >> x;
ll ans = 0;
ans = min(0,(b - a - 1)) / x;
if(a % x == 0) ans++;
if(a != b && b % x == 0) ans++;
cout <<... | a.cc: In function 'int main()':
a.cc:12:14: error: no matching function for call to 'min(int, ll)'
12 | ans = min(0,(b - a - 1)) / x;
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s659873338 | p03861 | C++ |
typedef unsigned long ULONG;
using namespace std;
int main(){
ULONG a, b, x;
cin >> a >> b >> x;
cout << b/x - (a-1UL)/x << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
7 | cin >> a >> b >> x;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 |
a.cc:9:3: error: 'cout' was not de... |
s785036254 | p03861 | C++ |
// Problem : B - Between a and b ...
// Contest : AtCoder - AtCoder Beginner Contest 048
// URL : https://atcoder.jp/contests/abc048/tasks/abc048_b
// Memory Limit : 256 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
/*⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣠⣶⡾⠏⠉⠙⠳⢦⡀⠀⠀⠀
⠀⠀⠀⣴⠿⠏⠀⠀⠀⠀⠀⠀⢳⡀... | a.cc:25:17: error: '__gnu_pbds' is not a namespace-name
25 | using namespace __gnu_pbds;
| ^~~~~~~~~~
a.cc:29:9: error: 'complex' does not name a type
29 | typedef complex<ld> cd;
| ^~~~~~~
a.cc:35:9: error: 'vector' does not name a type
35 | typedef vector<int> vi;
| ... |
s357330834 | p03861 | C++ | #include<bits/stdc++.h>
#define rep(i, n) for (int i=0; i < n; i++)
#define repd(i, n) for (int i = n-1; i > -1; i--)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
using namespace std;
using LP = pair<ll,ll>;
using P = pair<ll,int>;
int main()
{
ll a, b, x;
cin >> a >> b>> x;
auto div = [&](l... | a.cc: In function 'int main()':
a.cc:18:20: error: invalid operands of types 'void' and 'void' to binary 'operator-'
18 | ll ans = div(b)-div(a-1);
| ~~~~~~^~~~~~~~~
| | |
| void void
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.