submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s611575563 | p03663 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <fstream>
#include <cassert>
#include <cstring>
#include <unordered_set>
#include <unordered_map>
#include <numeric>
#include <ctime>... | a.cc: In function 'void run()':
a.cc:81:25: error: 'n' was not declared in this scope; did you mean 'yn'?
81 | cout << "! " << n << endl;
| ^
| yn
|
s348837260 | p03663 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <fstream>
#include <cassert>
#include <cstring>
#include <unordered_set>
#include <unordered_map>
#include <numeric>
#include <ctime>... | a.cc: In function 'void run()':
a.cc:72:13: error: 'n' was not declared in this scope; did you mean 'yn'?
72 | if (n != pr) {
| ^
| yn
|
s336177711 | p03663 | C++ | #include <bits/stdc++.h>
#ifdef __LOCAL
#define DBG(X) cout << #X << " = " << (X) << endl;
#define SAY(X) cout << (X) << endl;
#include <filesystem>
namespace fs = std::filesystem;
#else
#define DBG(X)
#define SAY(X)
#endif
using namespace std;
using ll = long long int;
using ull = unsigned lo... | a.cc: In function 'int solve()':
a.cc:112:8: error: redeclaration of 'll ans'
112 | ll ans=stol(N);
| ^~~
a.cc:111:8: note: 'll ans' previously declared here
111 | ll ans=0;
| ^~~
|
s611652954 | p03663 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq... | a.cc: In function 'int main()':
a.cc:44:9: error: 'else' without a previous 'if'
44 | else left=mid;
| ^~~~
|
s693880928 | p03663 | C++ | #include <bits/stdc++.h>
typedef long long ll;
int qry(ll x){
printf("? %lld\n",x);
fflush(stdout);
char s[3];
scanf("%s",s);
if (s[0]=='Y') return 1;
return 0;
}
int main(){
int w=0;ll L=1;
for (;qry(L) && w<=9;w++,L*=10);
if (w>9){
w=0,L=10;
for (;!qry(L-1);w++,L*=10);
printf("! %lld\n",L/10);
fflush... | a.cc: In function 'int main()':
a.cc:25:38: error: 'max' was not declared in this scope; did you mean 'std::max'?
25 | if (qry(mid*10)) ans=max(ans,mid),R=mid-1;
| ^~~
| std::max
In file included from /usr/include/c... |
s780681768 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
bool query(int x){
printf("? %lld\n", x);
fflush(stdout);
char s[20]; scanf("%s", s);
return str[0] == 'Y';
}
int pows(int x, int y) {
int z = 1;
while(y) {
if(y & 1) z *= x;
x *= x, y >>= 1;
} return z;
}
signed main() {
int len = 1;
quer... | a.cc: In function 'bool query(long long int)':
a.cc:8:16: error: 'str' was not declared in this scope; did you mean 'std'?
8 | return str[0] == 'Y';
| ^~~
| std
|
s617742151 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
bool query(int x){
printf("? %lld\n", x);
fflush(stdout);
char s[20]; scanf("%s", s);
return str[0] == 'Y';
}
int pows(int x, int y) {
int z = 1;
while(y) {
if(y & 1) z *= x;
x *= x, y >>= 1;
} return z;
}
signed main() {
int len = 1;
whil... | a.cc: In function 'bool query(long long int)':
a.cc:8:16: error: 'str' was not declared in this scope; did you mean 'std'?
8 | return str[0] == 'Y';
| ^~~
| std
|
s392130570 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using vint = vector<int>;
using vll = vector<ll>;
using uint = unsigned int;
using ull = unsigned long long;
template<typename T> using uset = unordered_set<T>;
template<typename T1, typename T2> us... | a.cc: In function 'char judge(std::string&)':
a.cc:49:16: error: 'c' was not declared in this scope
49 | cin >> c;
| ^
|
s580885574 | p03663 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
int N;
string hoge(int n){
string res;
//cout<<"N = "<<N<<" n = "<<n<<endl;
if(n <= N && to_string(n) <= to_string(N)) res = "Y";
else if(n > N && to_string(n) > to_string(N)) res = "Y";
else res = "N";
// cout<<"res = "<<res<<endl;
... | a.cc: In function 'int main()':
a.cc:165:3: error: 'sovle' was not declared in this scope; did you mean 'solve'?
165 | sovle();
| ^~~~~
| solve
|
s546335126 | p03663 | C++ | #include<bits/stdc++.h>
#define mo 1000000007
#define pi 3.1415926535898
#define eps 1e-9
using namespace std;
long long read(){#include<bits/stdc++.h>
#define mo 1000000007
#define pi 3.1415926535898
#define eps 1e-9
using namespace std;
long long read(){
long long xx=0,flagg=1;
char ch=getchar();
while(... | a.cc:6:18: error: stray '#' in program
6 | long long read(){#include<bits/stdc++.h>
| ^
a.cc: In function 'long long int read()':
a.cc:6:19: error: 'include' was not declared in this scope
6 | long long read(){#include<bits/stdc++.h>
| ^~~~~~~
a.cc:6:27: error: 'bi... |
s008679719 | p03663 | C++ | #include<bits/stdc++.h>
#define mo 1000000007
#define pi 3.1415926535898
#define eps 1e-9
using namespace std;
long long read(){
long long xx=0,flagg=1;
char ch=getchar();
while((ch<'0'||ch>'9')&&ch!='-')
ch=getchar();
if(ch=='-'){
flagg=-1;
ch=getchar();
}
while(ch>='0'... | a.cc: In function 'int main()':
a.cc:58:25: error: 'min1' was not declared in this scope
58 | min1=min(min1,mid);
| ^~~~
|
s731193321 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0);
#define FOR(i,s,n) for(int i = s; i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(n) (n).begin(), (n).end()
#define RALL(n) (n).rbegin(), (n).rend()
#define ATYN(n) cout << ( (n) ? "Yes":"No") << '\n';
#define CFYN(... | a.cc: In function 'int main()':
a.cc:40:26: error: expected ';' before ':' token
40 | aout(ans):
| ^
| ;
|
s360375120 | p03663 | C++ | ? 1000 | a.cc:1:1: error: expected unqualified-id before '?' token
1 | ? 1000
| ^
|
s598343993 | p03663 | C++ | ? 1000 | a.cc:1:1: error: expected unqualified-id before '?' token
1 | ? 1000
| ^
|
s938521292 | p03663 | C++ | ? 1000 | a.cc:1:1: error: expected unqualified-id before '?' token
1 | ? 1000
| ^
|
s416452538 | p03663 | C++ | //todo 文字数を少なくする
//mintより高速に計算したい時用に modmul() modadd (正の値限定) を作る
//#pragma GCC optimize ("-O3")
#include <bits/stdc++.h>
using namespace std;
//@起動時
struct initon {
initon() {
cin.tie(0);
ios::sync_with_stdio(false);
cout.setf(ios::fixed);
cout.precision(16);
srand((unsigned)... | a.cc: In function 'void solve()':
a.cc:2728:13: error: no match for 'operator==' (operand types are 'str' {aka 'std::__cxx11::basic_string<char>'} and 'char')
2728 | if(t=='Y')brk;
| ~^~~~~
| | |
| | char
| str {aka std::__cxx11::basic_strin... |
s238886664 | p03663 | C++ | #include<bits/stdc++.h>
#define ll long long
using namespace std;
int n=1e9;char s[10];
void query(int x){printf("? %d\n",x);fflush(stdout);scanf("%s",s);}
int read(){
int x=0,f=1;char ch=getchar();
while(!isdigit(ch)){if(ch=='-')f=-f;ch=getchar();}
while(isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return ... | a.cc: In function 'int main()':
a.cc:23:10: error: 'prinf' was not declared in this scope; did you mean 'printf'?
23 | }prinf("! %d\n",now);
| ^~~~~
| printf
|
s489961877 | p03663 | C++ | #include<bits/stdc++.h>
#define ll long long
using namespace std;
int n=1e9;char s[10];
void query(int x){printf("? %d\n",x);fflush(stdout);scanf("%s",s);}
int read(){
int x=0,f=1;char ch=getchar();
while(!isdigit(ch)){if(ch=='-')f=-f;ch=getchar();}
while(isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return ... | a.cc: In function 'int main()':
a.cc:22:10: error: 'prinf' was not declared in this scope; did you mean 'printf'?
22 | }prinf("! %d\n",now);
| ^~~~~
| printf
|
s796662681 | p03663 | C++ | /*Program from Luvwgyx*/
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
char s[10];
int read(){
int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
void print(int x){
if(x<... | a.cc: In function 'int main()':
a.cc:46:9: error: 'll' was not declared in this scope; did you mean 'l'?
46 | ll mid=(l+r)>>1;
| ^~
| l
a.cc:47:15: error: 'mid' was not declared in this scope
47 | query(mid*10);
| ^~~
|
s272223397 | p03663 | C++ | /*Program from Luvwgyx*/
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
char s[10];
int read(){
int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
void print(int x){
if(x<... | a.cc: In function 'int main()':
a.cc:34:9: error: 'll' was not declared in this scope; did you mean 'l'?
34 | ll mid=(l+r)>>1;
| ^~
| l
a.cc:35:15: error: 'mid' was not declared in this scope
35 | query(mid*10);
| ^~~
|
s616718039 | p03663 | C++ | /*Program from Luvwgyx*/
#include<cstdio>
#include<cstring>
#include<algorithm>
#define int long long
using namespace std;
char s[10];
int read(){
int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
void p... | a.cc: In function 'int main()':
a.cc:25:9: error: 'S' was not declared in this scope
25 | if (S[0]=='Y')
| ^
a.cc:40:13: error: 'S' was not declared in this scope
40 | if (S[0]=='Y')
| ^
a.cc:42:13: error: 'len' was not declared in this scope; did you mean 'mblen'?
4... |
s402913681 | p03663 | C++ | #include <iostream>
#include <string.h>
#include <stdio.h>
#include <map>
#include <vector>
#include <math.h>
#include <algorithm>
#include <queue>
#include <set>
#include <tuple>
using namespace std;
#define rep(i,a) for(int i=0; i<a; i++)
#define rrep(i,a) for(int i=a; i>=0; i--)
#define rep1(i,a) for(int i=1; i<=a;... | a.cc: In function 'int main()':
a.cc:45:17: error: 'c' was not declared in this scope
45 | while(num&&!c(num)) num/=10;
| ^
|
s750007759 | p03663 | C++ | #include <iostream>
#include <string.h>
#include <stdio.h>
#include <map>
#include <vector>
#include <math.h>
#include <algorithm>
#include <queue>
#include <set>
#include <tuple>
using namespace std;
#define rep(i,a) for(int i=0; i<a; i++)
#define rrep(i,a) for(int i=a; i>=0; i--)
#define rep1(i,a) for(int i=1; i<=a;... | a.cc: In function 'int main()':
a.cc:45:17: error: 'c' was not declared in this scope
45 | while(num&&!c(num)) num/=10;
| ^
|
s469159129 | p03663 | C++ | #include <iostream>
#include <string.h>
#include <stdio.h>
#include <map>
#include <vector>
#include <math.h>
#include <algorithm>
#include <queue>
#include <set>
#include <tuple>
using namespace std;
#define rep(i,a) for(int i=0; i<a; i++)
#define rrep(i,a) for(int i=a; i>=0; i--)
#define rep1(i,a) for(int i=1; i<=a;... | a.cc: In function 'int main()':
a.cc:45:17: error: 'c' was not declared in this scope
45 | while(num&&!c(num)) num/=10;
| ^
|
s452323871 | p03663 | C++ | #include <vector>
#include <string>
#include <map>
#include <set>
#include <iostream>
#include <queue>
#include <iomanip>
using namespace std;
#define int long long
#define stoi stoll
using ll=long long;
using vi=vector<int>;
using pii=pair<int,int>;
#define ALL(c) begin(c),end(c)
#define RALL(c) rbegin(c),rend(c)
#def... | a.cc: In function 'int main()':
a.cc:109:9: error: 'assert' was not declared in this scope
109 | assert(false);
| ^~~~~~
a.cc:8:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
7 | #include <iomanip>
+++ |+#include <cassert>
8 ... |
s147851294 | p03663 | C++ | #include<bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
char a;
int i=10;
while(i--){
if(i==0){
cout<<"! 1";
fflush(0);
return 0;
}
cout<<"? "<<(int)pow(10,i)-1<<"\n";
fflush(0);
cin>>a;
if(a=='N'){
break;
}
}
int l=(int)pow(10,i+1),r=(int)pow(10,i+2)-1;
while(l... | a.cc: In function 'int main()':
a.cc:22:28: error: 'rYYYYYYY' was not declared in this scope
22 | int mid=(l+rYYYYYYY)/2;
| ^~~~~~~~
|
s773040097 | p03663 | C++ | #include <bits/stdc++.h>
#define MOD 1000000007
#define INF 1061109567
#define pb push_back
#define in(s) freopen(s,"r",stdin);
#define out(s) freopen(s,"w",stdout);
#define fi first
#define se second
#define bw(i,r,l) for (int i=r-1;i>=l;i--)
#define fw(i,l,r) for (int i=l;i<r;i++)
#define fa(i,x) for (auto i:x)
using... | a.cc: In function 'void ask()':
a.cc:21:9: error: expected primary-expression before '}' token
21 | }
| ^
a.cc: In function 'int main()':
a.cc:50:19: error: too few arguments to function 'int fpow(int, int)'
50 | int l=fpow(cnt-1),r=fpow(cnt)-1;
| ~~~~^~~~~~~
a.cc... |
s905013875 | p03663 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
int x = 1;
for(; x <= 10 ; ++x)
cout << "? " << pow(10, x) << endl;
fflush(stdout);
char a;
cin >> a;
if(a == 'N'){
x--;
break;
}
}
int l = pow(10, x), r = pow(10, x + 1) - 1;
while(l != r){
int mid = (l + r) / ... | a.cc: In function 'int main()':
a.cc:15:25: error: break statement not within loop or switch
15 | break;
| ^~~~~
a.cc: At global scope:
a.cc:18:25: error: 'x' was not declared in this scope
18 | int l = pow(10, x), r = pow(10, x + 1) - 1;
| ... |
s408330433 | p03663 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <algorithm>
#include <string>
#include <climits>
#include <cmath>
#include <cstdlib>
#include "grader.h"
using namespace std;
string num = "";
char ask(string str)
{
char ch;
cout << "? " << str << endl << flush;
cin >> ch... | a.cc:10:10: fatal error: grader.h: No such file or directory
10 | #include "grader.h"
| ^~~~~~~~~~
compilation terminated.
|
s260724649 | p03663 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
int pw[22];
signed main(){
pw[0] = 1;
char v;
int s;
for(int i = 1 ; i <=10 ; ++i) pw[i] = pw[i - 1] * 10;
for(int i = 10 ; i >= 1 ; --i)
{
int check = pw[i] - 1;
cout << "? " << check;
fflush(stdout);
cin >> v;
if(v == "N")
{
s = ... | a.cc: In function 'int main()':
a.cc:16:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
16 | if(v == "N")
| ~~^~~~~~
a.cc:22:20: error: 'i' was not declared in this scope
22 | int l = pw[i] , r = pw[i + 1] - 1;
| ... |
s493680330 | p03663 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <algorithm>
#include <string>
#include <climits>
#include <cmath>
#include <cstdlib>
#include "grader.h"
using namespace std;
string num = "";
char ask(string str)
{
char ch;
cout << "? " << str << endl << flush;
cin >> ch... | a.cc:10:10: fatal error: grader.h: No such file or directory
10 | #include "grader.h"
| ^~~~~~~~~~
compilation terminated.
|
s561019973 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
const double PI = 3.14159265358979323846;
typedef vector<int> vint;
typedef pair<int, int> P;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
int val(vint x) {
int res = x[0];
for (int i = 1; i < x.size(); i+... | a.cc: In function 'int main()':
a.cc:40:14: error: redeclaration of 'char a'
40 | char a;
| ^
a.cc:22:14: note: 'char a' previously declared here
22 | char a;
| ^
|
s965156197 | p03663 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
main()
{
char s[2];
int now,k=1;
for(now=1;now<=10;now++,k*=10)
{
printf("? %d\n",k);
fflush(stdout);
scanf("%s",s);
if(s[0]=='N')break;
}
now--;
if(now==10)
{
k=2;
for(now=1;now<=10;now++,k*=10)
{
printf("? %d\n",k);
fflush(stdout);
... | 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:24:73: error: return-statement with no value, in function returning 'int' [-fpermissive]
24 | if(s[0]=='Y'){printf("! %d",k/2);fflush(stdout);... |
s786136118 | p03663 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
char s[2];
int now,k=1;
for(now=1;now<=10;now++,k*=10)
{
printf("? %d\n",k);
flush(stdout);
scanf("%s",s);
if(s[0]=='N')break;
}
now--;
if(now==10)
{
k=2;
for(now=1;now<=10;now++,k*=10)
{
printf("? %d\n",k);
flush(stdout);... | a.cc: In function 'int main()':
a.cc:11:22: error: no matching function for call to 'flush(FILE*&)'
11 | flush(stdout);
| ~~~~~^~~~~~~~
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:766:5: note: candidate: 'templ... |
s511663286 | p03663 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
// #undef DEBUG
// #define DEBUG
/// {{{ DEBUG --- ///
template <typename T> ostream &operator<<(ostream &o, const vector<T> &v) { if(&o == &cerr) { o << '{'; for(size_t i = 0; i < v.size(); i++) o << v[i] << (i + 1 != v.size() ? ", " : ""); o << "}"; ... | a.cc: In function 'int main()':
a.cc:39:52: error: cannot convert 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' in initialization
39 | if((now * 10 + mid) * b + c > 1e18) int x=cin>>x;
| ~~~^~~
| ... |
s873422426 | p03663 | C++ | #include <stdio.h>
#pragma warning(disable:4996)
//FILE *in = fopen("input.txt", "r"), *out = fopen("output.txt", "w");
FILE *in = stdin, *out = stdout;
#include <vector>
#include <algorithm>
#include <math.h>
using namespace std;
#define INF 0x7fffffff
#define NM 100005
#define MOD 1000000007
#define FOR(i,n,m) for (i... | a.cc: In lambda function:
a.cc:55:17: error: 'itoa' was not declared in this scope
55 | itoa(lhs, t1, 10); itoa(rhs, t2, 10);
| ^~~~
a.cc:56:24: error: 'strcmp' was not declared in this scope
56 | return strcmp(t1, t2)<=0;
| ^~~~~~... |
s258887169 | p03663 | C++ | #include<bits/stdc++.h>
#define ll long long
using namespace std;
bool fuck(char c, ll n) {
cout << c << " " << n << endl;
if (c == '?') {
string s; cin >> s;
if (s[0] == 'Y') return 1;
return 0;
}
}
int main() {
int len = 1, num = 1;
while (judge('?', num)) {
len *= 10; num = len;
}
len /=... | a.cc: In function 'int main()':
a.cc:14:16: error: 'judge' was not declared in this scope
14 | while (judge('?', num)) {
| ^~~~~
a.cc:22:29: error: 'judge' was not declared in this scope
22 | if (judge('?', mid * len + num)) l = mid;
| ... |
s299468301 | p03663 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<stack>
#include<cstdio>
#include<sstream>
#include<iomanip>
#include<assert.h>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loo... | a.cc: In function 'int main()':
a.cc:74:30: error: expected ';' before 'if'
74 | char a;cin>>a
| ^
| ;
75 | if(a=='Y')r=h;
| ~~
a.cc:76:17: error: 'else' without a previous 'if'
... |
s657485333 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
#define fst(t) std::get<0>(t)
#define snd(t) std::get<1>(t)
#define thd(t) std::get<2>(t)
#define unless(p) if(!p)
#define until(p) while(!p)
using ll = long long;
using P = std::tuple<int,int>;
const int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1,... | a.cc: In function 'int main()':
a.cc:54:73: error: no matching function for call to 'max(int, std::__cxx11::basic_string<char>::size_type)'
54 | char d = findDigit(res, res.size() == 0 ? 1 : 0, std::string(max(0, 18 - 1 - res.size()), '9'));
| ... |
s294666450 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
long long ans;
char rt1[5],rt3[5];
int main() {
ans = 1;
bool flag = true;
int bits = 1;
while(true) {
printf("? %lld", ans);
for (int i = bits + 1; i <= 17; i++) printf("9");
puts("");
//printf("? %lld999999999\n",ans);
... | a.cc: In function 'int main()':
a.cc:17:24: error: 'x' was not declared in this scope
17 | fflush(stdout);x
| ^
|
s491558451 | p03663 | C++ | #include <iostream>
#include <string>
using namespace std;
int cur=MOD-7;
inline bool check(int x){
cout<<"? "<<x<<endl;
string res;
cin>>res;
return res=="Y";
}
int main(){
if(check(cur)){
while(cur>1 && check(cur-1))cur/=10;;
cout<<"! "<<cur<<endl;
}
else{
while(!ch... | a.cc:4:9: error: 'MOD' was not declared in this scope
4 | int cur=MOD-7;
| ^~~
|
s717756706 | p03663 | C++ | #include <bits/stdc++.h>
typedef long long ll;
const ll most = 1e9;
bool query(ll val){
std::cout << "? " << val << std::endl;
char c;
std::cin >> c;
return (c == 'Y');
}
int main(){
ll length = 1;
if(!query(9)){
for(ll i = 10; i <= most; i *= 10){
if(query(i * 10 - 1)){
length = i;
break;
... | a.cc: In function 'int main()':
a.cc:53:20: error: 'target' was not declared in this scope
53 | if(best != target){
| ^~~~~~
|
s986348418 | p03663 | C++ | #include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <utility>
#include <complex>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <tuple>
#include <bitset>
#include <algorith... | a.cc: In function 'std::string query(ll)':
a.cc:49:14: error: no matching function for call to 'flush()'
49 | flush();
| ~~~~~^~
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:766:5: note: candidate: 'template<class _CharT, class... |
s587231179 | p03663 | C++ |
#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <string>
#include <sstream>
using namespace std;
#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define all(v) v.begin(),v.end()
#define INF 1<<30
#... | a.cc: In function 'int main()':
a.cc:42:17: error: '_i64toa_s' was not declared in this scope
42 | _i64toa_s(mid, buffer, sizeof(long) * 8 + 1, 10);
| ^~~~~~~~~
|
s620019433 | p03663 | C++ | #define _GLIBCXX_DEBUG
#include <iostream>
#include <cstdio>
#include <bits/stdc++.h>//"geometry.cpp"
#include <iomanip>//"cout<<fixed<<setprecision(n)<<sth<<endl;"
#include <queue>
#include <string>
#include <vector>
#include <utility>
#include <set>
#include <map>
#include <algorithm>//"lower_bound(it,it,v)", "next_p... | a.cc: In function 'bool q(long long int)':
a.cc:24:13: error: expected '(' before 'debuging'
24 | for debuging above
| ^~~~~~~~
| (
a.cc:24:13: error: 'debuging' was not declared in this scope
24 | for debuging above
| ^~~~~~~~
a.cc:27:14: erro... |
s225061395 | p03663 | C++ | #include <iostream>
using namespace std;
bool ask(int64_t a){
cout << "? " << a << endl;
char c;
cin >> c;
return c == 'Y';
}
void ans(int64_t a){
cout << "! " << a << endl;
}
int main(){
if(ask(1e9)){
int64_t a = 2;
while(!ask(a)) a *= 10;
ans(a / 2);
}else{
int64_t a = 1e8;
while(!ask(a)) a /= 10;... | a.cc: In function 'int main()':
a.cc:24:39: error: 'mid' was not declared in this scope
24 | while(1 < r - l) (ask(mid * 10) ? l : r) = mid;
| ^~~
|
s217453028 | p03663 | C++ | #include <stdlib.h>
#include <iostream>
#include <sstream>
#include <cmath>
#define ll long long
using namespace std;
void ask(ll x){
cout << "? " << x << endl;
fflush(stdout);
}
bool rec(){
char x;
cin >> x;
return (x == 'Y');
}
ll main(){
//确定N是否为10^k
bool is10;
ask(1000000000);
is10 = rec();
//确定位数
ll... | cc1plus: error: '::main' must return 'int'
|
s188670400 | p03663 | C++ | #include<algorithm>
#include<cmath>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<sstream>
#include<unordered_map>
#include<unordered_set>
#include<vector>
using namespace std;
using uint = unsigned int;
using ll = long long;
const int M = 1e9 + 7;
const ll ... | a.cc: In function 'int main()':
a.cc:78:13: error: 'printde' was not declared in this scope; did you mean 'printd'?
78 | printde(l, r, num);
| ^~~~~~~
| printd
|
s522658974 | p03663 | C++ | #pragma region include
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <sstream>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <cstring>
#include <vector>
#include <tuple>
#include <bitset>
#include <queue>
#include <complex>
#include <set>
#include <map>
#inc... | a.cc: In function 'void solve()':
a.cc:100:20: error: 'powMod' was not declared in this scope
100 | LL ket10 = powMod(10,keta-1);
| ^~~~~~
|
s425758435 | p03663 | C++ | #include<map>
#include<set>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<cstdio>
#include<cassert>
#include<iomanip>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<algorithm>
#define pi acos(-1)
#define ll long long
#define mod 1000000007
#define ls l,m,rt<<1
#define rs m+1... | a.cc: In function 'int main()':
a.cc:47:33: error: 't' was not declared in this scope
47 | cout<<"? 1"<<string(t-1,'0')<<endl;
| ^
|
s044170292 | p03663 | C++ | #include<algorithm>
#include<cmath>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<sstream>
#include<unordered_map>
#include<unordered_set>
#include<vector>
using namespace std;
using uint = unsigned int;
using ll = long long;
const int M = 1e9 + 7;
const ll ... | a.cc: In function 'int main()':
a.cc:37:9: error: 'sleep' was not declared in this scope
37 | sleep(0);
| ^~~~~
|
s436924120 | p03663 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define DEBUG(x) cout << '>' << #x << ':' << x << endl;
#define FOR0(i,n) for(int i=0, _##i=(n); i<_##i; ++i)
#define FOR(i,l,r) for(int i=(l), _##i=(r); i<_##i; ++i)
#define FORD(i,l,r) for(int i=(r), _##i=(l); --i>=_##i; )
#define repi(i,a)... | a.cc: In function 'int main()':
a.cc:34:13: error: 'check' was not declared in this scope; did you mean 'check1'?
34 | if(!check(n)) break;
| ^~~~~
| check1
a.cc:39:21: error: 'check' was not declared in this scope; did you mean 'check1'?
39 | if(!check(... |
s685757420 | p03663 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define DEBUG(x) cout << '>' << #x << ':' << x << endl;
#define FOR0(i,n) for(int i=0, _##i=(n); i<_##i; ++i)
#define FOR(i,l,r) for(int i=(l), _##i=(r); i<_##i; ++i)
#define FORD(i,l,r) for(int i=(r), _##i=(l); --i>=_##i; )
#define repi(i,a)... | a.cc: In function 'int main()':
a.cc:34:13: error: 'check' was not declared in this scope; did you mean 'check1'?
34 | if(!check(n)) break;
| ^~~~~
| check1
a.cc:39:21: error: 'check' was not declared in this scope; did you mean 'check1'?
39 | if(!check(... |
s858954802 | p03663 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define DEBUG(x) cout << '>' << #x << ':' << x << endl;
#define FOR0(i,n) for(int i=0, _##i=(n); i<_##i; ++i)
#define FOR(i,l,r) for(int i=(l), _##i=(r); i<_##i; ++i)
#define FORD(i,l,r) for(int i=(r), _##i=(l); --i>=_##i; )
#define repi(i,a)... | a.cc: In function 'int main()':
a.cc:34:13: error: 'check' was not declared in this scope; did you mean 'check1'?
34 | if(!check(n)) break;
| ^~~~~
| check1
a.cc:39:21: error: 'check' was not declared in this scope; did you mean 'check1'?
39 | if(!check(... |
s564992628 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll Ten(int x){
ll ret=1;
while( x-- )ret*=10ll;
return ret;
}
int ask(ll n){
n=max(n,1);
cout<<"? "<<n<<endl;
cout.flush();
char c;
cin>>c;
return c=='Y';
}
int main(){
int len=0;
while( ask(Ten(len)) )len++;len--;
ll num=0;
for(int i=0;i<len... | a.cc: In function 'int ask(ll)':
a.cc:12:10: error: no matching function for call to 'max(ll&, int)'
12 | n=max(n,1);
| ~~~^~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/incl... |
s533023984 | p03663 | C++ | #include<bits/stdc++.h>
const int N = 11;
typedef long long ll;
char s[N];
int ans[N];
bool query(ll n){
printf("? %lld\n", n);
fflush(stdout);
scanf("%s", s);
return s[0] == 'Y';
}
ll power[N];
int main(){
power[0] = 1;
for (int i = 1; i < N; ++ i){
power[i] = power[i - 1] * 10;
}
bool flag = query(powe... | a.cc: In function 'int main()':
a.cc:38:28: error: 'len' was not declared in this scope
38 | int left = len == 1, right = 9;
| ^~~
a.cc:39:39: error: 'right' was not declared in this scope; did you mean 'std::right'?
39 | for (int mid = left + right... |
s404820381 | p03663 | C++ | #include <bits/stdc++.h>
#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)
#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=(int)(a)-1;i>=(int)(b);--i)... | a.cc: In function 'int main()':
a.cc:72:17: error: 'ok' was not declared in this scope
72 | ok = true;
| ^~
a.cc:80:16: error: 'ok' was not declared in this scope
80 | if(not ok) lb = 0;
| ^~
|
s504349198 | p03663 | C++ | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ls rt << 1
#define rs rt << 1 | 1
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define X first
#define Y second
#define pcc pair<char, char>
#define rep(i, x, y) for(int i = x; i <= y; i ++)
#define eps 1e-9
usi... | a.cc: In function 'int main()':
a.cc:24:9: error: 'LL' was not declared in this scope; did you mean 'll'?
24 | LL l, r, mid, no, wei;
| ^~
| ll
a.cc:26:13: error: 'no' was not declared in this scope
26 | for(no = 0, wei = 100000000000000000LL; ; wei /= 10)
| ... |
s401553334 | p03663 | C++ | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ls rt << 1
#define rs rt << 1 | 1
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define X first
#define Y second
#define pcc pair<char, char>
#define rep(i, x, y) for(int i = x; i <= y; i ++)
#define eps 1e-9
usi... | a.cc: In function 'int main()':
a.cc:24:9: error: 'LL' was not declared in this scope; did you mean 'll'?
24 | LL l, r, mid, no, wei;
| ^~
| ll
a.cc:26:13: error: 'no' was not declared in this scope
26 | for(no = 0, wei = 100000000000000000LL; ; wei /= 10)
| ... |
s923293743 | p03663 | C++ | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <assert.h>
using namespace std;
// string s1 = "1000000";
// long v1 = 55;
bool get(){
string str;
cin >> str;
return str=="Y";
}
bool ask(string str){
cout << "? " << str << endl;
return get();
... | a.cc: In function 'bool ret(std::string)':
a.cc:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
23 | }
| ^
a.cc: In function 'int main()':
a.cc:72:49: error: expected ')' before ';' token
72 | string x = ask(prefix+to_string(low);
| ... |
s147062979 | p03663 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define rep(i,l,r) for(int i=(l);i<(r);++i)
//-------
char ch;
int qry(ll n) {
cout << "? " << n << endl;
... | a.cc: In function 'int qry(ll)':
a.cc:15:15: error: too few arguments to function 'int fflush(FILE*)'
15 | fflush();
| ~~~~~~^~
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c++/14/ext/string_conversions.h:45,
from /usr/include/c++/14/b... |
s785923323 | p03663 | C++ | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <assert.h>
using namespace std;
// string s1 = "1000000";
// long v1 = 55;
bool get(){
string str;
cin >> str;
return str=="Y";
}
bool ask(string str){
// cout << "? " << str << endl;
// return g... | a.cc: In function 'bool ask(std::string)':
a.cc:18:50: error: 'v1' was not declared in this scope; did you mean '__pstl::execution::v1'?
18 | cout << "ASK " << str << " " << ((stol(str)<=v1) == (str<=s1)) << endl;
| ^~
| ... |
s336160350 | p03663 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
using namespace std;
#define pb push_back
#define ri(x) scanf("%d",&x)
#define rii(x,y) ri(x),ri(y)
#define ms(obj,val) memset(obj,val,sizeof(obj))
#define ms2(obj,val,sz) memset(obj,val,sizeof(obj[0])*sz)
... | a.cc:34:6: error: redefinition of 'bool check1(int)'
34 | bool check1(int d) {
| ^~~~~~
a.cc:24:6: note: 'bool check1(int)' previously defined here
24 | bool check1(int d) {
| ^~~~~~
a.cc: In function 'int main()':
a.cc:67:20: error: 'check2' was not declared in this scope; did you mean 'che... |
s106579181 | p03663 | C++ | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ls rt << 1
#define rs rt << 1 | 1
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define X first
#define Y second
#define pcc pair<char, char>
#define rep(i, x, y) for(int i = x; i <= y; i ++)
#define eps 1e-9
usi... | a.cc: In function 'int main()':
a.cc:24:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
24 | rep(i,1,9) ans[i] = 0;
| ^~~
| abs
a.cc:31:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
31 | a... |
s075620173 | p03663 | C++ | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ls rt << 1
#define rs rt << 1 | 1
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define X first
#define Y second
#define pcc pair<char, char>
#define rep(i, x, y) for(int i = x; i <= y; i ++)
#define eps 1e-9
usi... | a.cc: In function 'int main()':
a.cc:24:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
24 | rep(i,1,9) ans[i] = 0;
| ^~~
| abs
a.cc:31:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
31 | a... |
s767749273 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
const long long MOD=1e9+7;
const double PI=3.14159265359;
long long getLead(){
long long nines=1e11-1ll, mult=1e11;
cout<<nines<<endl;
long long l=1, r=9;
while(l+1<r){
long long mid=(l+r)/2;
cout<<"? ""<<mid*mult+nines<<endl;
... | a.cc:16:19: warning: missing terminating " character
16 | cout<<"? ""<<mid*mult+nines<<endl;
| ^
a.cc:16:19: error: missing terminating " character
16 | cout<<"? ""<<mid*mult+nines<<endl;
| ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'long long int ge... |
s992725442 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef long long ll;
typedef pair<long long, long long> l4;
typedef vector<long long> vll;
typedef double db;
typedef vector<double> vdb;
typedef pair<double, double> dd;
typedef set<int> si;
typedef set<long long> sll;
#... | a.cc: In function 'int main()':
a.cc:54:13: error: 'LL' was not declared in this scope; did you mean 'll'?
54 | LL l=n/10+1,u=n-1,med;
| ^~
| ll
a.cc:55:19: error: 'l' was not declared in this scope
55 | while(l<u){
| ^
a.cc:55:21... |
s704011182 | p03663 | C++ | #include <stdio.h>
#include <algorithm>
using namespace std;
using ll = long long;
void A(ll x) {
printf("! %lld\n", x);
fflush(stdout);
}
bool Q(ll x) {
printf("? %lld\n", x);
fflush(stdout);
char R[2];
scanf("%s", R);
return R[0] == 'Y';
}
int main() {
ll value;
{
ll up = 10, down = 0, center = (up + down)... | a.cc: In function 'int main()':
a.cc:45:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
45 | return;
| ^~~~~~
|
s096152471 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
inline bool query(const LL& n) {
printf("? %I64d\n",n);
char x[4];
scanf("%s",x);
return x[0]=='Y';
}
inline bool query(const char* s) {
printf("? %s\n",s);
char x[4];
scanf("%s",x);
return x[0]=='Y';
}
inline int getlen() {
int l=1,r=10;
... | a.cc: In function 'LL getnum(const int&)':
a.cc:54:16: error: '_atoi64' was not declared in this scope; did you mean 'atoi'?
54 | return _atoi64(str);
| ^~~~~~~
| atoi
|
s909063467 | p03663 | C++ | #include <iostream>
#include <ccomplex>
#include <vector>
#include <cassert>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <numeric>
#include <list>
#include <assert.h>
#include <math.h>
#incl... | a.cc: In function 'int main()':
a.cc:87:10: error: expected '}' at end of input
87 | }
| ^
a.cc:51:12: note: to match this '{'
51 | int main() {
| ^
|
s828503770 | p03663 | C++ | #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
bool In(){
char z;
cin>>z;
if(z=='N')return false;
return true;
}
int main(){
int t=1000000000;
while(true){
cout<<"? "<<t<<flush;
if(In()){
if(t==1000000000){
cout<<"! 1000000000"<<flush;
return 0;
}
break;
}
t/... | a.cc: In function 'int main()':
a.cc:36:15: error: unable to find string literal operator 'operator""ans' with 'const char [3]', 'long unsigned int' arguments
36 | cout<<"! "ans<<flush;
| ^~~~~~~
|
s607805090 | p03663 | C++ | #include<bits\stdc++.h>
using namespace std;
long long t,l,r,mid;
char c;
void doit1(long long n)
{
long long ts=n;
while(ts)
{
ts=(ts-9)/10;
cout<<"? "<<ts<<endl;
cin>>c;
if (c=='N')
{
cout<<"! "<<ts+1<<endl;
exit(0);
}
}
}
int main()
{
fflush(stdout);
t=10;
while(1)
{
cout<<"? "<<t<<endl;
... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s484636486 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define inf 1000000007LL
#define rep(i, n) for(int i = 0; i < (n); i++)
#define trep(i, n) for(int i = 0; i <= (n); i++)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
#define mfor(i, s, t) for(int i = (s); i < (t); i++)
bool comp(string s, bo... | a.cc: In function 'int main()':
a.cc:54:12: error: expected primary-expression before 'if'
54 | if(if(s[i + 1] == '0' && comp(s2, false)) {
| ^~
a.cc:54:12: error: expected ')' before 'if'
54 | if(if(s[i + 1] == '0' && comp(s2, false)) {
| ~^~
| )
... |
s576203811 | p03663 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZER... | a.cc: In function 'void ans(ll)':
a.cc:40:15: error: 'na' was not declared in this scope; did you mean 'nan'?
40 | cout<<na<<endl;
| ^~
| nan
a.cc: In function 'void solve()':
a.cc:47:14: error: 'N' was not declared in this scope
47 | cin>>N;
| ... |
s451642711 | p03663 | Java | import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class CT {
static Scanner in;
static PrintWriter out;
static String INPUT = "";
static boolean q(long n)
{
out.println("? " + n);
out.flush();
return in.next().charAt(0) == 'Y';
}
// static long hans = 9;
//
// sta... | Main.java:5: error: class CT is public, should be declared in a file named CT.java
public class CT {
^
1 error
|
s699424586 | p03663 | Java | package arc78;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class CT {
static Scanner in;
static PrintWriter out;
static String INPUT = "";
static boolean q(long n)
{
out.println("? " + n);
out.flush();
return in.next().charAt(0) == 'Y';
}
// static long hans ... | Main.java:6: error: class CT is public, should be declared in a file named CT.java
public class CT {
^
1 error
|
s101597741 | p03664 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
#define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
typedef long long ll;
typedef long double ld;
const ll SZ = (2 << 16), LG = 18, INF = LLONG_MAX;
ll n, m;
ll grid[LG][LG], inter[S... | a.cc:14:41: error: 'LLONG_MAX' was not declared in this scope
14 | const ll SZ = (2 << 16), LG = 18, INF = LLONG_MAX;
| ^~~~~~~~~
a.cc:5:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include <cmath... |
s362548011 | p03664 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long
int n,m,u,v,w;
ll bismarck[(1<<15)][15],e[15][15],sum[(1<<15)];
int main()
{
cin>>n>>m;
while(m--)
{
cin>>u>>v>>w;
u--,v--;
e[u][v]=e[v][u]=w;
}
for(int i=0;i<1<<n;i++)
{
for(int j=0;j<n;j++)
if((i>>j)&1)
{
for(int k=j+1;k<n... | a.cc: In function 'int main()':
a.cc:33:90: error: 'x' was not declared in this scope
33 | if((i>>k)&1&&e[j][k]) bismarck[i][j]=max(bismarck[i][j],bismarck[x][k]+e[k][j]);
| ^
|
s104007736 | p03664 | C++ | /*
数据不清空,爆零两行泪。
多测不读完,爆零两行泪。
边界不特判,爆零两行泪。
贪心不证明,爆零两行泪。
D P 顺序错,爆零两行泪。
大小少等号,爆零两行泪。
变量不统一,爆零两行泪。
越界不判断,爆零两行泪。
调试不注释,爆零两行泪。
溢出不 l l,爆零两行泪。
*/
#include<bits/stdc++.h>
using namespace std;
const int inf=0x3f3f3f3f;
const int N=15;
int n,m;
int tb[N][N];
int sum[1<<N];
int tmp[1<<N][N],dp[1<<N][N];
void prt_bitmsk(int x){
... | a.cc:95:1: error: extended character 。 is not valid in an identifier
95 | 多测不读完,爆零两行泪。
| ^
a.cc:96:1: error: extended character 。 is not valid in an identifier
96 | 边界不特判,爆零两行泪。
| ^
a.cc:97:1: error: extended character 。 is not valid in an identifier
97 | 贪心不证明,爆零两行泪。
| ^
a.cc:98:5: error: ex... |
s475806037 | p03664 | C++ | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define LL long lone
#define INF 0x3f3f3f3f
#define Inf 1000000000000000000LL
#define F first
#define S second
using namespace std;
typedef pair<int,int>pii;
struct stane{int a,b;LL c;};
int n,m,N,g[20][20],val[40010],dp[40010][20];
vector<pii>vv;
vecto... | a.cc:4:17: error: expected ';' at end of member declaration
4 | #define LL long lone
| ^~~~
a.cc:11:22: note: in expansion of macro 'LL'
11 | struct stane{int a,b;LL c;};
| ^~
a.cc:11:25: error: 'c' does not name a type
11 | struct stane{int a,b;LL c;};
|... |
s931850310 | p03664 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN=15;
const int MAXP=(1<<MAXN);
int N,M;
int edge[MAXN][MAXN];
int cscore[MAXP];
int dp[MAXN][MAXP];
int main(){
ios_base::sync_with_stdio(0);
cin>>N>>M;
for (int i=0;i<M;i++){
int a,b,c;
cin>>a>>b>>c;
... | a.cc: In function 'int main()':
a.cc:29:24: error: 'MXP' was not declared in this scope; did you mean 'MAXP'?
29 | for (int j=0;j<MXP;j++)
| ^~~
| MAXP
|
s574052238 | p03664 | C++ | #include<bits/stdc++.h>
using namespace std;
inline int read() {
int res=0,fh=1;
char ch=getchar();
while((ch>'9'||ch<'0')&&ch!='-')ch=getchar();
if(ch=='-')fh=-1,ch=getchar();
while(ch>='0'&&ch<='9')res=res*10+ch-'0',ch=getchar();
return fh*res;
}
const int maxn=(1<<16);
int n,m,mxs,sum[maxn],a[maxn][maxn];
i... | /tmp/ccdT9yWx.o: in function `main':
a.cc:(.text+0x1ed): relocation truncated to fit: R_X86_64_PC32 against symbol `f' defined in .bss section in /tmp/ccdT9yWx.o
a.cc:(.text+0x1fb): relocation truncated to fit: R_X86_64_PC32 against symbol `f' defined in .bss section in /tmp/ccdT9yWx.o
a.cc:(.text+0x238): relocation tr... |
s450472676 | p03664 | C++ | /*input
4 6
1 2 100
3 1 100
2 4 100
4 3 100
1 4 100
3 2 100
*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typ... | a.cc: In function 'int main()':
a.cc:59:30: error: expected ';' before ':' token
59 | tmp++:
| ^
| ;
|
s632322414 | p03664 | C | 15 22
8 13 33418
14 15 55849
7 10 15207
4 6 64328
6 9 86902
15 7 46978
8 14 53526
1 2 8720
14 12 37748
8 3 61543
6 5 32425
4 11 20932
3 12 55123
8 2 45333
9 12 77796
3 9 71922
12 15 70793
2 4 25485
11 6 1436
2 7 81563
7 11 97843
3 1 40491 | main.c:1:1: error: expected identifier or '(' before numeric constant
1 | 15 22
| ^~
|
s469927902 | p03664 | C++ |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=1<<15;
int n,m,c[15][15];
int p[N],dp[N][15];
void init()
{
memset(p,0,sizeof(p));
for(int i=0;i<(1<<n);i++)
for(int j=0;j<n;j++)
dp[i][j]=-1;
for(int i=0;i<(1<<n);i++)
{
for(int j=0;j<n;j++)
{
if(((i>>j)&1)==0)
continu... | a.cc: In function 'int main()':
a.cc:72:18: error: expected '}' at end of input
72 | return 0;
| ^
a.cc:30:1: note: to match this '{'
30 | {
| ^
|
s727801196 | p03664 | C++ | #include<bits/stdc++.h>
#define lowbit(x) (x&-x)
#define mem(a,b) memset(a,b,sizeof(a))
#define For(i,a,b) for(int i=a,i##E=b;i<=i##E;++i)
#define rFor(i,a,b) for(int i=a,i##E=b;i>=i##E;--i)
using namespace std;
typedef long long LL;
const int N=16;
template<typename T>inline bool chkmin(T &a,const T &b){return a>b?a=... | a.cc: In function 'int main()':
a.cc:50:17: error: 'inf' was not declared in this scope; did you mean 'ynf'?
50 | mem(dp,-inf);
| ^~~
a.cc:3:27: note: in definition of macro 'mem'
3 | #define mem(a,b) memset(a,b,sizeof(a))
| ^
|
s103210641 | p03664 | C++ | #include <iostream>
int checked[40000][16];
long long dp[40000][16];
long long esum[40000];
using namespace std;
int eds[16][16];
int n,m;
long long calc(int state,int now);
long long calc_sub(int state_base,int state,int dep,int now,int prev) {
if(dep==n) {
return esum[state_base-state]+eds[now][prev]+calc(state,... | a.cc:2:1: error: extended character is not valid in an identifier
2 |
| ^
a.cc:2:1: error: '\U000000a0' does not name a type
2 |
| ^
a.cc: In function 'long long int calc(int, int)':
a.cc:29:12: error: 'checked' was not declared in this scope
29 | if(checked[state][now]) return dp[s... |
s636918228 | p03664 | C++ | #include <iostream>
int checked[40000][16];
long long dp[40000][16];
long long esum[40000];
using namespace std;
int eds[16][16];
int n,m;
long long calc(int state,int now);
long long calc_sub(int state_base,int state,int dep,int now,int prev) {
if(dep==n) {
return esum[state_base-state]+eds[now][prev]+calc(state,... | a.cc:2:1: error: extended character is not valid in an identifier
2 |
| ^
a.cc:2:1: error: '\U000000a0' does not name a type
2 |
| ^
a.cc: In function 'long long int calc(int, int)':
a.cc:29:12: error: 'checked' was not declared in this scope
29 | if(checked[state][now]) return dp[s... |
s718966140 | p03664 | C++ | #include <iostream>
int checked[40000][16];
long long dp[40000][16];
long long esum[40000];
using namespace std;
int eds[16][16];
int n,m;
long long calc(int state,int now);
long long calc_sub(int state_base,int state,int dep,int now,int prev) {
if(dep==n) {
return esum[state_base-state]+eds[now][prev]+calc(state,... | a.cc:2:1: error: extended character is not valid in an identifier
2 |
| ^
a.cc:2:1: error: '\U000000a0' does not name a type
2 |
| ^
a.cc: In function 'long long int calc(int, int)':
a.cc:29:12: error: 'checked' was not declared in this scope
29 | if(checked[state][now]) return dp[s... |
s656884571 | p03664 | C++ | #include <conio.h>
#include <bits/stdc++.h>
using namespace std;
const int N=20;
int n,m,k,a[N],p2,T[N],E[N*N][3],ans=1<<30;
struct node
{
int c,a,b;
bool operator<(const node &o)const
{
return c>o.c;
}
}ed[N*N];
int Findx(int x)
{
if(T[x]==-1)return x;
return T[x]=Findx(T[x]);
}
void Merge(int a,int b)
{
i... | a.cc:1:10: fatal error: conio.h: No such file or directory
1 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s538373769 | p03664 | C++ | /*あかん*/
#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#include "bits/stdc++.h" // define macro "/D__MAI"
using namespace std;
typedef long long int ll;
#define xprintf(fmt,...) fprintf(stderr,fmt,__VA_ARGS__)
#define debugv(v) {printf("L%d %s => ",__LINE__,#v);for(auto e:v){cout<<e<<" ";}cout<<endl;}
#defi... | a.cc: In member function '{anonymous}::MaiScanner& {anonymous}::MaiScanner::operator>>(std::string&)':
a.cc:66:9: warning: no return statement in function returning non-void [-Wreturn-type]
66 | }
| ^
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14... |
s440617363 | p03664 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <sstream>
#include <string>
#include <map>
#include <set>
#include <stdlib.h>
#include <cmath>
#include <math.h>
#include <fstream>
#include <bitset>
#include <time.h>
#include <queue>
#include <cassert>
#include <cstdio>
#include <c... | a.cc:26:12: error: 'number' was not declared in this scope
26 | int dp[number][n];
| ^~~~~~
a.cc:26:20: error: size of array 'dp' is not an integral constant-expression
26 | int dp[number][n];
| ^
a.cc: In function 'long long int kraskall()':
a.cc:48:23: error: re... |
s670684099 | p03665 | C++ | #include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <map>
#include <math.h>
#include <memory>
#include <queue>
#inc... | a.cc: In function 'void solve()':
a.cc:501:41: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type, int)'
501 | ll ans = pow(2, cnt[0]) * pow(2, max(cnt[1]-1, 0));
| ~~~^~~~~~~~~~~~~
In file inc... |
s542120867 | p03665 | C | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i=0;i<(ll)n;++i)
using P = pair<ll,ll>;
ll factorial( ll n ){
if( n == 1 ) return 1;
return n*factorial(n-1);
}
ll comb( ll n, ll r ){
if( n < r ) return 0;
if( r == 0 || n == r ) return 1;
if( r == 1 || n == r+1 ) re... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s645434886 | p03665 | C++ | int main() {
int N,P;
cin >>N >> P;
vector<int>vec(N);
long long cou0=0,cou1=0;
long long ans=1,ans2=0,ansa,muri,ansb=0;
for(int i=0;i<N;i++){
cin >> vec.at(i);
if(vec.at(i)%2==0)cou0++;
else cou1++;
}
for(int i=0;i<cou0;i++){
ans*=2;
}
if(P==1){
for(int i=1;... | a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >>N >> P;
| ^~~
a.cc:4:3: error: 'vector' was not declared in this scope
4 | vector<int>vec(N);
| ^~~~~~
a.cc:4:10: error: expected primary-expression before 'int'
4 | vector<int>vec(N);
... |
s784872655 | p03665 | C++ | int main()
{
int n, p;
scanf("%d%d", &n, &p);
int m = 0;
rep(i, n) {
int a;
scanf("%d", &a);
if(a % 2 == 1) m++;
}
if(m == 0) {
ll ans = 1ll << n; //2^n
if(p == 0) printf("%lld\n", ans);
else printf("0\n");
}
else {
ll ans = 1ll << (n - 1); //2^n-1
printf("%lld\n", ans);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf' was not declared in this scope
4 | scanf("%d%d", &n, &p);
| ^~~~~
a.cc:6:13: error: 'i' was not declared in this scope
6 | rep(i, n) {
| ^
a.cc:6:9: error: 'rep' was not declared in this scope
6 | ... |
s536777682 | p03665 | C++ | #define rep(i,n) for (int i=0; i<(int)(n); i++)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, p; cin >> n >> p;
vector<int> A(n);
rep(i,n) cin >> A[i];
int oddcnt = 0;
rep(i,n) {
if (A[i] % 2) oddcnt++;
}
... | a.cc:5:11: error: 'pair' does not name a type
5 | using P = pair<int, int>;
| ^~~~
a.cc: In function 'int main()':
a.cc:8:13: error: 'cin' was not declared in this scope
8 | int n, p; cin >> n >> p;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is p... |
s770699903 | p03665 | C++ | n, p = map(int, input().split())
la = [int(i) % 2 for i in input().split()]
n0 = sum(1 for a in la if a % 2 == 0)
n1 = sum(1 for a in la if a % 2 == 1)
def combi(n, k):
c = 1
for i in range(1, n + 1):
c *= i
for i in range(1, k + 1):
c //= i
for i in range(1, n - k + 1):
c //=... | a.cc:1:1: error: 'n' does not name a type
1 | n, p = map(int, input().split())
| ^
|
s296541214 | p03665 | C++ | // lcmとか__builtin_popcountとかはg++ -std=c++17 default.cppみたいなかんじで
#include <bits/stdc++.h>
#define mod 1000000007
#define INF 1001001001
#define ll long long
#define ln cout<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
usin... | a.cc: In function 'int main()':
a.cc:48:16: error: no match for 'operator+=' (operand types are 'long long int' and 'std::vector<std::vector<long long int> >')
48 | sum+=comb((int)n,(int)i);
| ~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:54:18: error: invalid cast from type 'std::vector<std::vector<lo... |
s378924526 | p03665 | C++ | #include <bits/stdc++.h>
using namespace std;
map< long long, int > prime_factor(long long n) {
map< long long, int > ret;
for (long long i = 2; i * i <= n; i++) {
while (n % i == 0) {
ret[i]++;
n /= i;
}
}
if (n != 1) ret[n] = 1;
return ret;
}
int main() {
int n, p;
cin >> n >> p;
vector<int> a(n... | a.cc: In function 'int main()':
a.cc:34:41: error: expected primary-expression before '}' token
34 | if(oddcount==0 && p==0){cout << }
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.