submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s811283735 | p03880 | C++ | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
void toBinary(ll x){
char s[100];
ltoa(x , s , 2);
cout << s << endl;
}
bool comp(int a , int b){
return (a &-a) > (b & -b) ;
}
const int N = 1e5 + 5 ;
int a[N];
int main()
{
// 1010
int n ;
cin >> n ;
int xo = ... | a.cc: In function 'void toBinary(ll)':
a.cc:8:5: error: 'ltoa' was not declared in this scope
8 | ltoa(x , s , 2);
| ^~~~
|
s607609393 | p03880 | C++ | #include <bits/stdc++.h>
#define int long long
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
#define X first
#define Y second
#define endl '\n'
#define all(o) o.begin(), o.end()
#define IOS ios::sync_with_stdio(0), cin.tie(0)
struct space{
vec... | a.cc: In member function 'long long int space::size()':
a.cc:3:13: error: expected primary-expression before 'long'
3 | #define int long long
| ^~~~
a.cc:26:23: note: in expansion of macro 'int'
26 | int size(){return int(v.size());}
| ^~~
a.cc:3:13: error: expec... |
s734452870 | p03880 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define ALL(A) A.begin(), A.end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int MAX_N = (int)1e5 + 5;
bool used[MAX_N]; // この数字を使ったかどうか
bool change[MAX_N]; // この桁が1引く事によって変化するかどうか
int main()
{
memset(used, false, siz... | a.cc: In function 'int main()':
a.cc:27:24: error: 'cand' was not declared in this scope; did you mean 'rand'?
27 | memset(cand, false, sizeof(cand));
| ^~~~
| rand
|
s291631296 | p03880 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, a[100009], b[100009];
int main() {
scanf("%d", &n);
for(int i = 0; i < n; i++) scanf("%d", &a[i]);
bool flag = true;
for(int i = 30; i >= 0 && flag; i--) {
int s = 0;
for(int j = 0; j < n; j++) s ^= (a[j] >> i) & 1;
if(s == 1) {
bool ok = false;
for(i... | a.cc: In function 'int main()':
a.cc:24:44: error: 'j' was not declared in this scope
24 | for(int i = 0; i < n; i++) ss ^= a[j];
| ^
|
s242540949 | p03880 | C++ | #include <stdio.h>
int main(void)
{
int N, M[100000], S[30] = {0};
int i,j, a = 0;
scanf("%d", &N);
for (i = 0; i < N; i++) scanf("%d", &M[i]);
for (j = 0; j < N; j++ ) {
for (i = 0; i < 30; i++) {
S[i] += (M[j]>>i&1);
}
}
for (i = 0; i < 30; i++) {
if (S[i] % 2) a++;
}
}
printf("%d", a)... | a.cc:23:15: error: expected constructor, destructor, or type conversion before '(' token
23 | printf("%d", a);
| ^
a.cc:25:9: error: expected unqualified-id before 'return'
25 | return 0;
| ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
26 | }
... |
s845315061 | p03880 | C++ | #include <bits/stdc++.h>
#ifdef AZN
#include "Azn.cpp"
#else
#define pln(...)
#endif
using namespace std;
typedef long long ll;
typedef double dd;
void solve(ll test_num) {
(void) test_num;
int N;
cin >> N;
vector<int> arr(N);
for (int& a : arr) cin >> a;
int xsum = 0;
set<int> have;
for (int a : ... | a.cc: In function 'void solve(ll)':
a.cc:28:3: error: 'dbgln' was not declared in this scope
28 | dbgln(xsum);
| ^~~~~
|
s725090044 | p03881 | C++ | // #include {{{
#include <iostream>
#include <cassert>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <ctime>
#include <queue>
#include <set>
#include <map>
#include <stack>
#include <string>
#include <bitset>
#include <vector>
#include <complex>
#include <algorithm>... | a.cc: In function 'int main()':
a.cc:42:3: error: 'function' was not declared in this scope
42 | function<db(db)> get = [&](db x) -> db {
| ^~~~~~~~
a.cc:19:1: note: 'std::function' is defined in header '<functional>'; this is probably fixable by adding '#include <functional>'
18 | #include <algorithm>
... |
s496604608 | p03881 | C | #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>
using namespace std;
#define all(c) (c).begin(), ... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s719568097 | p03882 | C++ | 15
335279264 849598327 822889311
446755913 526239859 548830120
181424399 715477619 342858071
625711486 448565595 480845266
647639160 467825612 449656269
160714711 336869678 545923679
61020590 573085537 816372580
626006012 389312924 135599877
547865075 511429216 605997004
561330066 539239436 921749002
650693494 63219754... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 15
| ^~
|
s194927291 | p03883 | C++ | #include "bits/stdc++.h"
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL;
typedef vector<... | a.cc: In instantiation of 'Val& DP<Val, Sizes>::operator()(SizesT ...) [with SizesT = {int, int, int}; Val = long long int; int ...Sizes = {0, 0, 2}]':
a.cc:71:5: required from here
71 | dp(0, 0, 0) = 0;
| ~~^~~~~~~~~
a.cc:46:67: error: 'getIndexAcc' was not declared in this s... |
s055623972 | p03883 | C++ | #include <cstdio>
#include <algorithm>
#include <stack>
#include <queue>
#include <deque>
#include <vector>
#include <string>
#include <string.h>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <map>
#include <set>
#include <iostream>
#include <sstream>
#include <numeric>
#include <cctype>
#include <bitse... | a.cc:169:12: error: redefinition of 'int in()'
169 | inline int in() { int x; scanf("%d",&x); return x;}
| ^~
a.cc:46:12: note: 'int in()' previously defined here
46 | inline int in() { int x; scanf("%d",&x); return x;}
| ^~
a.cc:170:13: error: redefinition of 'void priv(vi)'
17... |
s995299555 | p03887 | C++ | asasasas | a.cc:1:1: error: 'asasasas' does not name a type
1 | asasasas
| ^~~~~~~~
|
s373546093 | p03887 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <math.h>
#include <set>
#define FOR(i, n, m) for(ll i = n; i < (int)m; i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define pb push_back
using namespace std;
using ll = std::int_fast64_t;
using P = pair<ll, ll>;
constexpr ll inf = ... | a.cc:11:17: error: 'int_fast64_t' in namespace 'std' does not name a type
11 | using ll = std::int_fast64_t;
| ^~~~~~~~~~~~
a.cc:12:16: error: 'll' was not declared in this scope
12 | using P = pair<ll, ll>;
| ^~
a.cc:12:20: error: 'll' was not declared in this scope
... |
s276561091 | p03887 | C | long long n,a,b,c,f[5006][5006],i,j,r,y,s,m=1000000007;main(){scanf("%llu%llu%llu%llu",&n,&a,&b,&c);b%2&&exit(!puts("0"));for(f[0][0]=1;++i<=n;s=c+3)for(f[i][j=0]=1;++j<=i;)f[i][j]=(f[i-1][j-1]+f[i-1][j])%m;for(i=0;(s-=3)>=0;r+=y%m*f[a+b/2+i][i]%m,i++)if(b)for(y=j=0;j<=a&&j<=s;j++)y+=f[a][j]*f[s+b/2-1-j][b/2-1]%m;else ... | main.c:1:56: error: return type defaults to 'int' [-Wimplicit-int]
1 | long long n,a,b,c,f[5006][5006],i,j,r,y,s,m=1000000007;main(){scanf("%llu%llu%llu%llu",&n,&a,&b,&c);b%2&&exit(!puts("0"));for(f[0][0]=1;++i<=n;s=c+3)for(f[i][j=0]=1;++j<=i;)f[i][j]=(f[i-1][j-1]+f[i-1][j])%m;for(i=0;(s-=3)>=0;r+=y%m*f[a+b/2+i][i]... |
s508736153 | p03887 | C++ | 滅びを知る者、いずれ安らぎを得る果報者たちよ。我が羨望!我が憎悪!死の痛みをもって知るがいい!
滅びの定めにすら見放された、我が永遠の孤独。空よ!雲よ!憐みの涙で命を呪え! | a.cc:1:1: error: extended character 、 is not valid in an identifier
1 | 滅びを知る者、いずれ安らぎを得る果報者たちよ。我が羨望!我が憎悪!死の痛みをもって知るがいい!
| ^
a.cc:1:1: error: extended character 。 is not valid in an identifier
a.cc:2:1: error: extended character 、 is not valid in an identifier
2 | 滅びの定めにすら見放された、我が永遠の孤独。空よ!雲よ!憐みの涙で命を呪え!
... |
s859567109 | p03887 | C++ | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author Majk
*/
#include <iostream>
#include <fstream>
#include <iostream>
#include <vector>
#include <unordered_map>
#include <map>
#include <iomanip>
#include <functional>
#include <algorithm>
#include <cassert>
#include ... | a.cc: In member function 'void J::solve(std::istream&, std::ostream&)':
a.cc:64:31: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<Field<1000000007> >, Field<1000000007> >::value_type' {aka 'Field<1000000007>'} and 'int')
64 | F[0] = I[0] = 1;
| ... |
s687223698 | p03888 | C++ | def main():
R1, R2 = map(int, input().split())
ans = R1 * R2 / (R1 + R2)
print(ans)
if __name__ == "__main__":
main()
| a.cc:1:1: error: 'def' does not name a type
1 | def main():
| ^~~
|
s484034284 | p03888 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long double a,b;
cin >> a >> b;
cout fixed << setprecision(15) << 1/(1/a+1/b);
}
| a.cc: In function 'int main()':
a.cc:6:7: error: expected ';' before 'fixed'
6 | cout fixed << setprecision(15) << 1/(1/a+1/b);
| ^~~~~~
| ;
|
s310336502 | p03888 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _... | a.cc: In function 'int main()':
a.cc:21:36: error: expected ';' before 'double'
21 | cout << fixed <<setprecision(10)
| ^
| ;
22 | double x; x = 1/double(a) + 1/double(b);
| ~~~~~~
a.cc:22:1... |
s671990743 | p03888 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _... | a.cc: In function 'int main()':
a.cc:20:18: error: expected primary-expression before 'double'
20 | double x; x = double 1/(a) + double 1/(b);
| ^~~~~~
a.cc:21:22: error: expected primary-expression before 'double'
21 | double ans; ans = double 1/x;
| ^~~~~~... |
s789075131 | p03888 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _... | a.cc: In function 'int main()':
a.cc:20:4: error: 'ans' was not declared in this scope; did you mean 'abs'?
20 | ans; 1/ans=1/a+1/b;
| ^~~
| abs
|
s643918369 | p03888 | C++ | int main() {
// Write Your Code Below
double a,b;
cin >> a >> b;
double c = 1/a + 1/b;
cout << fixed << setprecision(10);
cout << 1/c << endl;
} | a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
4 | cin >> a >> b;
| ^~~
a.cc:6:6: error: 'cout' was not declared in this scope
6 | cout << fixed << setprecision(10);
| ^~~~
a.cc:6:14: error: 'fixed' was not declared in this scope
6 | ... |
s011981603 | p03888 | C++ | int main() {
cin >> a >> b;
cout << fixed << setprecision(10);
cout << 1/(1/a + 1/b) < endl;
}
| a.cc: In function 'int main()':
a.cc:2:3: error: 'cin' was not declared in this scope
2 | cin >> a >> b;
| ^~~
a.cc:2:10: error: 'a' was not declared in this scope
2 | cin >> a >> b;
| ^
a.cc:2:15: error: 'b' was not declared in this scope
2 | cin >> a >> b;
| ... |
s733954024 | p03888 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
double R1,R2;
double R3;
cin>>R1>>R2;
R3 = (R1 * R2)/(R1 + R2);
cout<< R3 <<endl;
cout << fixed << setprecision(10);
return 0;
} | a.cc: In function 'int main()':
a.cc:16:22: error: 'setprecision' was not declared in this scope
16 | cout << fixed << setprecision(10);
| ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
1 | ... |
s275865647 | p03888 | C++ | int main() {
// Write Your Code Below
double R1, R2;
cin >>R1>>R2;
double ans=(double (1./R1)+double (1./R2));
cout <<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
4 | cin >>R1>>R2;
| ^~~
a.cc:6:3: error: 'cout' was not declared in this scope
6 | cout <<ans<<endl;
| ^~~~
a.cc:6:15: error: 'endl' was not declared in this scope
6 | cout <<ans<<endl;
| ... |
s927755598 | p03888 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _... | a.cc: In function 'int main()':
a.cc:20:43: error: expected ';' before 'cout'
20 | cout << fixed << setprecision(100)
| ^
| ;
21 | cout << (A*B)/(A+B) << endl;
| ~~~~ ... |
s135155776 | p03888 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _... | a.cc: In function 'int main()':
a.cc:20:39: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000009' to '1410065417' [-Woverflow]
20 | cout << fixed << setprecision(10000000009) ;
| ^~~~~~~~~~~
a.cc:21:18: error: 'AB' was not declar... |
s922698303 | p03888 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _... | a.cc: In function 'int main()':
a.cc:20:39: warning: overflow in conversion from 'long int' to 'int' changes value from '1000000000000' to '-727379968' [-Woverflow]
20 | cout << fixed << setprecision(1000000000000)
| ^~~~~~~~~~~~~
a.cc:20:53: error: expected ';' be... |
s403665202 | p03888 | C++ | int main() {
// Write Your Code Below
ll R1, R2;
cin >>R1>>R2;
double ans=(double(1/R1)+double(1/R2));
cout <<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:3:1: error: 'll' was not declared in this scope
3 | ll R1, R2;
| ^~
a.cc:4:3: error: 'cin' was not declared in this scope
4 | cin >>R1>>R2;
| ^~~
a.cc:4:9: error: 'R1' was not declared in this scope
4 | cin >>R1>>R2;
| ^~
a.cc:4:13: error:... |
s279064872 | p03888 | C++ | int main() {
// Write Your Code Below
ll R1, R2;
cin >>R1>>R2;
double ans=(double(R1)+double(R2));
cout <<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:3:1: error: 'll' was not declared in this scope
3 | ll R1, R2;
| ^~
a.cc:4:3: error: 'cin' was not declared in this scope
4 | cin >>R1>>R2;
| ^~~
a.cc:4:9: error: 'R1' was not declared in this scope
4 | cin >>R1>>R2;
| ^~
a.cc:4:13: error:... |
s811877514 | p03888 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _... | a.cc: In function 'int main()':
a.cc:21:18: error: 'AB' was not declared in this scope; did you mean 'B'?
21 | cout << (AB)/(A+B) << endl;
| ^~
| B
|
s471598389 | p03888 | C++ | int main() {
ll R1, R2;
cin >>R1>>R2;
double (ans=double(R1)+double(R2))
} | a.cc: In function 'int main()':
a.cc:2:3: error: 'll' was not declared in this scope
2 | ll R1, R2;
| ^~
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >>R1>>R2;
| ^~~
a.cc:3:9: error: 'R1' was not declared in this scope
3 | cin >>R1>>R2;
| ^~
a.cc:3:13: er... |
s440217003 | p03888 | C++ | 100 99 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 100 99
| ^~~
|
s459149550 | p03888 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _... | a.cc: In function 'int main()':
a.cc:18:23: error: expected unqualified-id before ';' token
18 | double A, B, ;
| ^
|
s264599487 | p03888 | Java | java.util.*;
class Main
{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
System.out.println(1 / ( ( 1 / sc.nextInt() ) + ( 1 / sc.nextInt() ) ) );
}
} | Main.java:1: error: class, interface, enum, or record expected
java.util.*;
^
1 error
|
s181227732 | p03888 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
double a,b;
cin>>a>>b;
printf("%.12lf\n"a*b/(a+b));
}
| a.cc: In function 'int main()':
a.cc:6:10: error: unable to find string literal operator 'operator""a' with 'const char [8]', 'long unsigned int' arguments
6 | printf("%.12lf\n"a*b/(a+b));
| ^~~~~~~~~~~
|
s703879003 | p03888 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
double a,b;
cin>>a>>b;
printf("%12lf\n"a*b/(a+b));
} | a.cc: In function 'int main()':
a.cc:6:10: error: unable to find string literal operator 'operator""a' with 'const char [7]', 'long unsigned int' arguments
6 | printf("%12lf\n"a*b/(a+b));
| ^~~~~~~~~~
|
s312860115 | p03888 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
scanf("%d %d",&a,&b);
printf("%.10f\n",a*b/(a+b));
}
} | a.cc:8:1: error: expected declaration before '}' token
8 | }
| ^
|
s767313676 | p03888 | C++ | #include <bits/stdc++.h>
using namespace std;
int mai ()
{
string s;
cin>>s;
bool tmp = false;
if (s.size() %2 !=0){ cout<<"No"<<endl;}
else {
for (int i = 0; i < s.size(); ++i)
{
int n = s.size()-1-i;
if (s[i]=='b' && s[n] != 'd') tmp = false;
if (s[i]=='d' && s[n] != 'b') tmp = fal... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s338683859 | p03888 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
long double r1;
long double r2;
printf("%.15Lf\n", 1 / ((1 / p1) + (1 / p2)));
return 0;
} | a.cc: In function 'int main()':
a.cc:7:32: error: 'p1' was not declared in this scope; did you mean 'r1'?
7 | printf("%.15Lf\n", 1 / ((1 / p1) + (1 / p2)));
| ^~
| r1
a.cc:7:43: error: 'p2' was not declared in this scope; did you mean 'r2'?... |
s327539669 | p03888 | C++ | #include<iostream>
#include<algorithm>
#include<math.h>
#include<cstdio>
#include<ctype.h>
#include<stdio.h>
#include<set>
#include<vector>
#include<map>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<numeric>
#include<string>
using namespace std;
typedef long long ll... | a.cc: In function 'int main()':
a.cc:33:23: error: 'subscription' was not declared in this scope
33 | cout <<fixed<<subscription(8)<< z << endl;
| ^~~~~~~~~~~~
|
s060364515 | p03888 | C++ | #include<iostream>
#include<algorithm>
#include<math.h>
#include<cstdio>
#include<ctype.h>
#include<stdio.h>
#include<set>
#include<vector>
#include<map>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<numeric>
#include<string>
using namespace std;
typedef long long ll... | a.cc: In function 'int main()':
a.cc:33:18: error: invalid operands of types 'long double' and '<unresolved overloaded function type>' to binary 'operator<<'
33 | cout < z << endl;
| ~~^~~~~~~
|
s536439128 | p03888 | C++ | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <string>
#include <cstring>
#include <vec... | a.cc: In function 'int main()':
a.cc:59:15: error: 'fixec' was not declared in this scope
59 | cout<<fixec<<a*b/(a+b)<<endl;
| ^~~~~
|
s710258884 | p03888 | C++ | #include <cstsio>
double r1,r2;
int main()
{
scanf("%lf%lf",&r1,&r2);
printf("%.10f¥n",(r1*r2)/(r1+r2));
return 0;
} | a.cc:1:10: fatal error: cstsio: No such file or directory
1 | #include <cstsio>
| ^~~~~~~~
compilation terminated.
|
s698931944 | p03888 | C++ | #include <stdio.h>
#include <cstdio>
#include <algorithm>
using namespace std;
int main(){
int r1,r2;
while(cin>>r1>>r2){
double r3 = r1*r2*1.0/(r1+r2);
printf("%.7f\n",r3);
//cout<<r3<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope
9 | while(cin>>r1>>r2){
| ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
3 | #include <algorithm>
+++ |+#include <iostream>
4 | ... |
s599422910 | p03888 | C++ | #include<iostream>
using namespace std;
int main(){
double x, y;
cin >> x;
cin >> y;
z=x*y/(x+y);
cout << z;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:1: error: 'z' was not declared in this scope
9 | z=x*y/(x+y);
| ^
|
s799476820 | p03888 | C | #include <stdio.h>
int main(void){
int a,b;
scanf("%d %d",&a,&b)
printf("%f",(a*b)/(a+b));
return 0;
} | main.c: In function 'main':
main.c:5:26: error: expected ';' before 'printf'
5 | scanf("%d %d",&a,&b)
| ^
| ;
6 | printf("%f",(a*b)/(a+b));
| ~~~~~~
|
s155169733 | p03888 | C | #include <stdio.h>
int main(void){
int a,b;
scanf("%d %d",&a,&b)
printf("%f",a*b*(a+b));
return 0;
}
| main.c: In function 'main':
main.c:5:26: error: expected ';' before 'printf'
5 | scanf("%d %d",&a,&b)
| ^
| ;
6 | printf("%f",a*b*(a+b));
| ~~~~~~
|
s919938559 | p03888 | C++ | #include<iostream>
int main(){
int a,b;
cin >> a >> b;
printf("%.9f",1./(1./a+1./b));
return 0;
} | a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> a >> b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to sta... |
s311514936 | p03888 | C++ | from fractions import *
r1,r2=map(int,input().split())
R1=Fraction(1,r1)
R2=Fraction(1,r2)
R3=R1+R2
print(R3.denominator/R3.numerator) | a.cc:1:1: error: 'from' does not name a type
1 | from fractions import *
| ^~~~
|
s129120981 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
string t = s:
int n = s.size();
for(int i = 0; i < n; i++){
if(s[i] == 'b'){
s[i] == 'd';
continue;
}
else if(s[i] == 'd'){
s[i] == 'b';
continue;
}
else if(s[i] == 'p'){
s[i] == 'q... | a.cc: In function 'int main()':
a.cc:7:15: error: expected ',' or ';' before ':' token
7 | string t = s:
| ^
a.cc:9:22: error: 'n' was not declared in this scope
9 | for(int i = 0; i < n; i++){
| ^
|
s709607952 | p03889 | C++ | #include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
string s;
int n;
cin>>s;
n=s.length();
map<char,int> m;
m.insert('p',0);
m.insert('q',1);
m.insert('b',2);
m.insert('d',3);
for(int i=0;i<n;i++){
if((m[s[i]]^m[s[n-1-i]])!=1){
cout<<"No"<<endl;
return... | a.cc: In function 'int main()':
a.cc:12:11: error: no matching function for call to 'std::map<char, int>::insert(char, int)'
12 | m.insert('p',0);
| ~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/map:63,
from a.cc:3:
/usr/include/c++/14/bits/stl_map.h:847:9: note: candidate: 'te... |
s579474043 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
string st;
char ch[100010];
long long len;
int main()
{
cin>>st;
len=st.size();
for(int i=0;i<st.size();i++)
{
ch[len-i-1]=st[i];
if(st[i]=='b')ch[len-i-1]='d';
if(st[i]=='d')ch[len-i-1]='b';
if(st[i]=='p')ch[len-i-1]='q';
... | a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
25 | }
| ^
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s934428713 | p03889 | C++ | #include<iostream>
#include<cstring>
#include<string>
using namespace std;
int main()
{
string a;
cin >> a;
string b = a;
reverse(a.begin(), a.end());
for (int i = 0; i < a.length(); ++i)
{
if (a[i] == 'b') a[i] = 'd';
else if (a[i] == 'd') a[i] = 'b';
else if (a[i] == 'p') a[i] = 'q';
else if (a[i] == '... | a.cc: In function 'int main()':
a.cc:10:9: error: 'reverse' was not declared in this scope
10 | reverse(a.begin(), a.end());
| ^~~~~~~
|
s853526891 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
string a;
void mir()
{
int l=a.size();
for(int i=0;i<l;i++)
{
if(a[i]=="p")
{
a[i]='q';
}
else if(a[i]=="q")
{
a[i]='p';
}
else if(a[i]=="d")
{
a[i]='b';
}
else
{
a[i]='d';
}
}
}... | a.cc: In function 'void mir()':
a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if(a[i]=="p")
a.cc:13:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
13 | else if(a[i]=="q")
a.cc:17:17: error: ISO C++ forbids comparison between ... |
s950136818 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
string a;
void mir()
{
int l=a.size();
for(int i=0;i<l;i++)
{
if(a[i]=="p")
{
a[i]="q";
}
else if(a[i]=="q")
{
a[i]="p";
}
else if(a[i]=="d")
{
a[i]="b";
}
else
{
a[i]="d";
}
}
}... | a.cc: In function 'void mir()':
a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if(a[i]=="p")
a.cc:11:14: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
11 | a[... |
s129487277 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
string a;
void mir()
{
int l=a.size();
for(int i=0;i<l;i++)
{
if(a[i]=="p")
{
a[i]="q";
}
else if(a[i]=="q")
{
a[i]="p";
}
else if(a[i]=="d")
{
a[i]="b";
}
else
{
a[i]="d";
}
}
}... | a.cc: In function 'void mir()':
a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if(a[i]=="p")
a.cc:11:14: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
11 | a[... |
s726867090 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
string a;
void mir()
{
int l=a.size();
for(int i=0;i<l;i++)
{
if(a[i]=="p")
{
a[i]=q;
}
else if(a[i]=="q")
{
a[i]=p;
}
else if(a[i]=="d")
{
a[i]=b;
}
else
{
a[i]=d;
}
}
}
string ... | a.cc: In function 'void mir()':
a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if(a[i]=="p")
a.cc:11:14: error: 'q' was not declared in this scope
11 | a[i]=q;
| ^
a.cc:13:17: error: ISO C++ forbids comparison between pointer and integer... |
s462885035 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
string a;
void mir()
{
int l=a.size();
for(int i=0;i<l;i++)
{
if(a[i]=='p')
{
a[i]=q;
}
else if(a[i]=='q')
{
a[i]=p;
}
else if(a[i]=='d')
{
a[i]=b;
}
else
{
a[i]=d;
}
}
}
string ... | a.cc: In function 'void mir()':
a.cc:11:14: error: 'q' was not declared in this scope
11 | a[i]=q;
| ^
a.cc:15:14: error: 'p' was not declared in this scope
15 | a[i]=p;
| ^
a.cc:19:14: error: 'b' was not declared in this scope
19 | a[i]=b;
| ... |
s569355209 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
string a;
void mir()
{
int l=a.size();
for(int i=0;i<l;i++)
{
if(a[i]=="p")
{
a[i]=q;
}
else if(a[i]=="q")
{
a[i]=p;
}
else if(a[i]=="d")
{
a[i]=b;
}
else
{
a[i]=d;
}
}
}
string ... | a.cc: In function 'void mir()':
a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if(a[i]=="p")
a.cc:11:14: error: 'q' was not declared in this scope
11 | a[i]=q;
| ^
a.cc:13:17: error: ISO C++ forbids comparison between pointer and integer... |
s736569142 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef '' "";
string a;
void mir()
{
int l=a.size();
for(int i=0;i<l;i++)
{
if(a[i]=='p')
{
a[i]=q;
}
else if(a[i]=='q')
{
a[i]=p;
}
else if(a[i]=='d')
{
a[i]=b;
}
else
{
a[i]=d;
}
... | a.cc:3:9: error: empty character constant
3 | typedef '' "";
| ^~
a.cc:3:9: error: expected unqualified-id before '\x0'
a.cc: In function 'void mir()':
a.cc:12:14: error: 'q' was not declared in this scope
12 | a[i]=q;
| ^
a.cc:16:14: error: 'p' was not declared in this s... |
s013397252 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
string a;
void mir()
{
int l=a.size();
for(int i=0;i<l;i++)
{
if(a[i]=='p')
{
a[i]=q;
}
else if(a[i]=='q')
{
a[i]=p;
}
else if(a[i]=='d')
{
a[i]=b;
}
else
{
a[i]=d;
}
}
}
string ... | a.cc: In function 'void mir()':
a.cc:11:14: error: 'q' was not declared in this scope
11 | a[i]=q;
| ^
a.cc:15:14: error: 'p' was not declared in this scope
15 | a[i]=p;
| ^
a.cc:19:14: error: 'b' was not declared in this scope
19 | a[i]=b;
| ... |
s971848351 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
string a;
void mir()
{
int l=a.size();
for(int i=0;i<l;i++)
{
if(a=='p')
{
a[i]=q;
}
else if(a=='q')
{
a[i]=p;
}
else if(a=='d')
{
a[i]=b;
}
else
{
a[i]=d;
}
}
}
string fz(string... | a.cc: In function 'void mir()':
a.cc:9:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
9 | if(a=='p')
| ~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<char>}
In fi... |
s709289137 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
char mir(char a)
{
if(a=='p')
{
return q;
}
else if(a=='q')
{
return p;
}
else if(a=='d')
{
return b;
}
else
{
return d;
}
}
string fz(string a)
{
int l=a.size();
for(int i=0;i<l/2;i++)
... | a.cc: In function 'char mir(char)':
a.cc:7:16: error: 'q' was not declared in this scope
7 | return q;
| ^
a.cc:11:16: error: 'p' was not declared in this scope
11 | return p;
| ^
a.cc:15:16: error: 'b' was not declared in this scope
15 | retur... |
s959080896 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
char mir(char a)
{
if(a=='p')
{
return q;
}
else if(a=='q')
{
return p;
}
else if(a=='d')
{
return b;
}
else
{
return d;
}
}
string fz(string a)
{
} | a.cc: In function 'char mir(char)':
a.cc:7:16: error: 'q' was not declared in this scope
7 | return q;
| ^
a.cc:11:16: error: 'p' was not declared in this scope
11 | return p;
| ^
a.cc:15:16: error: 'b' was not declared in this scope
15 | retur... |
s282058187 | p03889 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<map>
#include<iomanip>
#include<queue>
#include<stack>
#include<time.h>
#define rep(i,n)for(int i=0;i<n;i++)
#define int long long
#define ggr getchar();getchar();return 0;
#define prique priority_queue
#define mod 1000000... | a.cc: In function 'void init(long long int)':
a.cc:70:17: error: reference to 'rank' is ambiguous
70 | rank[i] = 0;
| ^~~~
In file included from /usr/include/c++/14/bits/move.h:37,
from /usr/include/c++/14/bits/exception_ptr.h:41,
from /usr/incl... |
s034596363 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a;
cin>>a;
string b=a;
reverse(a.begin(),a.end());
for(int i=0;i<a.size();i++)
{
if(a[i]=='b')
a[i]='d';
else if(a[i]=='d')
a[i]='b';
else if(a[i]=='p')
a[i]='q';
... | a.cc: In function 'int main()':
a.cc:19:11: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
19 | if(!(a-b))
| ~^~
| | |
| | basic_string<[...]>
... |
s163331681 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a;
cin>>a;
string b=a;
reverse(a.begin(),a.end());
for(int i=0;i<a.size();i++)
{
if(a[i]=='b')
a[i]='d';
else if(a[i]=='d')
a[i]='b';
else if(a[i]=='p')
a[i]='q';
... | a.cc: In function 'int main()':
a.cc:19:8: error: no match for 'operator!' (operand type is 'std::string' {aka 'std::__cxx11::basic_string<char>'})
19 | if(!a-b)
| ^~
a.cc:19:8: note: candidate: 'operator!(bool)' (built-in)
a.cc:19:8: note: no known conversion for argument 1 from 'std::string' {ak... |
s451780869 | p03889 | C++ | #include <bits/stdc++.h> | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s015733941 | p03889 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<string>
#include<cstring>
using namespace std;
string st;
char ch[100000+10];
long long len;
int main()
{
cin>>st;
len=st.size();
for(int i=0;i<st.size();i++)
{
ch[len-i-1]=st[i];
if(st[i]=='b')ch[len-i-1]='d';
if(st[i]=='d')ch[... | a.cc: In function 'int main()':
a.cc:27:35: error: expected ';' before 'return'
27 | cout<<"No"
| ^
| ;
28 | return 0;
| ~~~~~~
|
s098565766 | p03889 | C++ | #include<iostream>
#include<cstring>
using namespace std;
int main(){
string a;
cin>>a;
string b=a;
reverse(a.begin(),a.end());
for(int i=0;i<a.size();++i)
{
if(a[i]=='b') a[i]='d';
else if(a[i]=='d') a[i]='b';
else if(a[i]=='p') a[i]='q';
else if(a[i]=='q') a[i]=... | a.cc: In function 'int main()':
a.cc:8:5: error: 'reverse' was not declared in this scope
8 | reverse(a.begin(),a.end());
| ^~~~~~~
|
s749781701 | p03889 | C++ | #include<iostream>
#include<memory.h>
#include<iomanip>
#include<string>
using namespace std;
int main()
{
int l;
string s,r;
cin>>s;
r=s;
l=s.length();
reverse(s.begin(),s.end());
for(int i=0;i<l;i++)
{
if(s[i]=='b')s[i]='d';
else if(s[i]=='d')s[i]='b';
else if(s[i]=='p')s[i]='q';
else i... | a.cc: In function 'int main()':
a.cc:13:9: error: 'reverse' was not declared in this scope
13 | reverse(s.begin(),s.end());
| ^~~~~~~
|
s815596966 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
string a,b;
int main()
{
cin>>a;
b=a;
reverse(a.begin(),a.end());
for(int i=0;i<a.size();i++)
{
if(a[i]=='b') a[i]='d';
else if(a[i]=='d') a[i]='b';
else if(a[i]=='p') a[i]='q';
else if(a[i]=='q') a[i]='p';
}
if(a==... | a.cc:16:28: error: extended character 。 is not valid in an identifier
16 | if(a==b) printf("Yes");。
| ^
a.cc: In function 'int main()':
a.cc:16:28: error: '\U00003002' was not declared in this scope
16 | if(a==b) printf("Yes");。
| ^~
|
s504861195 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{char a[100005],b[100005];
bool flag=0;
gets(a);
int lena,k=0;
lena=strlen(a);
for(int i=lena-1;i>=0;i--)
{if(a[i]=='b'){
b[k]='d';
k++;
}
else if(a[i]=='d'){
b[k]='b';
k++;
}
else if(a[i]=='p'){
b[k]='q';
k++;
}
else if(a[i]=='q'){
b[k]=... | a.cc: In function 'int main()':
a.cc:6:2: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(a);
| ^~~~
| getw
|
s470695686 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{char a[100005],b[100005];
bool flag=0;
gets(a);
int lena,k=0;
lena=strlen(a);
for(int i=lena-1;i>=0;i--)
{if(a[i]=='b'){
b[k]='d';
k++;
}
else if(a[i]=='d'){
b[k]='b';
k++;
}
else if(a[i]=='p'){
b[k]='q';
k++;
}
else if(a[i]=='q'){
b[k]=... | a.cc: In function 'int main()':
a.cc:6:2: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(a);
| ^~~~
| getw
|
s738214929 | p03889 | C++ | #include<iostream>
#include<memory.h>
#include<iomanip>
#include<string>
using namespace std;
int main()
{
int l;
string s,r;
cin>>s;
r=s;
l=s.length();
reverse(s.begin(),s.end());
for(int i=0;i<l;i++)
{
if(s[i]=='b')s[i]='d';
else if(s[i]=='d')s[i]='b';
else if(s[i]=='p')s[i]='q';
else i... | a.cc: In function 'int main()':
a.cc:13:9: error: 'reverse' was not declared in this scope
13 | reverse(s.begin(),s.end());
| ^~~~~~~
|
s803437938 | p03889 | C++ | #include<iostream>
#include<memory.h>
#include<iomanip>
#include<string>
using namespace std;
int main()
{
int l;
string s,r;
cin>>s;
r=s;
l=s.length();
reverse(s.begin(),s.end());
for(int i=0;i<l;i++)
{
if(s[i]=='b')s[i]='d';
else if(s[i]=='d')s[i]='b';
else if(s[i]=='p')s[i]='q';
else i... | a.cc: In function 'int main()':
a.cc:13:9: error: 'reverse' was not declared in this scope
13 | reverse(s.begin(),s.end());
| ^~~~~~~
|
s990838253 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int mian()
{
string a;
cin >> a;
string b = a;
reverse(a.begin(), a.end());
for (int i = 0; i < a.length(); ++i)
{
if (a[i] == 'b') a[i] = 'd';
else if (a[i] == 'd') a[i] = 'b';
else if (a[i] == 'p') a[i] = 'q';
else if (a[i] == 'q') a[i] = 'p';
}
if (a == b) cout << "... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s443866709 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int mian()
{
string a;
cin >> a;
string b = a;
reverse(a.begin(), a.end());
for (int i = 0; i < a.length(); ++i)
{
if (a[i] == 'b') a[i] = 'd';
else if (a[i] == 'd') a[i] = 'b';
else if (a[i] == 'p') a[i] = 'q';
else if (a[i] == 'q') a[i] = 'p';
}
if (a == b) cout << "... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s623945646 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
string a;
int main()
{
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);
cin>>a;
if(a=='qdbp' || a=='pdbq' || a=='qbdp' || a=='pbdq')
else cout<<"no";
return 0;
}
| a.cc:10:15: warning: multi-character character constant [-Wmultichar]
10 | if(a=='qdbp' || a=='pdbq' || a=='qbdp' || a=='pbdq')
| ^~~~~~
a.cc:10:28: warning: multi-character character constant [-Wmultichar]
10 | if(a=='qdbp' || a=='pdbq' || a=='qbdp' || a=='pbdq')
| ... |
s807147057 | p03889 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
string st="bdqp";
string s1,s2;
int i;
cin>>s1;
int len=strlen(s1);
for(i=len;i>=0;i--)
{
s2[len+1-i]=s1[i];
}
for(i=0;i<len;i++)
{
if(s2[i]==st[0]) s2[i]=st[1];
if(s2[i]... | a.cc: In function 'int main()':
a.cc:10:13: error: 'strlen' was not declared in this scope
10 | int len=strlen(s1);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdio>
+++ |+#include <cstring>
... |
s418828059 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
cin>>a;
string b=a;
reverse(a.begin(),a.end());
for(int i=i;i<a.end();i++)
{
if(a[i]=='b')a[i]=='d';
if(a[i]=='d')a[i]=='b';
if(a[i]=='p')a[i]=='q';
if(a[i]=='q')a[i]=='p';
}
if(a==b)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:9:22: error: no match for 'operator<' (operand types are 'int' and 'std::__cxx11::basic_string<char>::iterator')
9 | for(int i=i;i<a.end();i++)
| ~^~~~~~~~
| | |
| int std::__cxx11::bas... |
s748276743 | p03889 | C++ | #include<bits/stdc++.h>
using namespce std;
int main()
{
string a;
cin>>a;
string b=a;
reverse(a.begin(),a.end());
for(int i=i;i<a.end();i++)
{
if(a[i]=='b')a[i]=='d';
if(a[i]=='d')a[i]=='b';
if(a[i]=='p')a[i]=='q';
if(a[i]=='q')a[i]=='p';
}
if(a==b)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc:2:7: error: expected nested-name-specifier before 'namespce'
2 | using namespce std;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
5 | string a;
| ^~~~~~
a.cc:5:9: note: suggested alternatives:
In file included from /us... |
s401140922 | p03889 | C++ | // luogu-judger-enable-o2
| /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s791328065 | p03889 | C++ | // luogu-judger-enable-o2
| /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s950467723 | p03889 | C++ | // luogu-judger-enable-o2
| /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s548026327 | p03889 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
string s,s1;
cin>>s;
s1.reverse(s1.begin(),s1.end());
if(s==s1)cout<<"Yes"<<endl;
else cout<<"No";
} | a.cc: In function 'int main()':
a.cc:8:12: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
8 | s1.reverse(s1.begin(),s1.end());
| ^~~~~~~
| reserve
|
s427674484 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
string s,g;
char hs(char c){
if(c=='b') return 'd';
if(c=='d') return 'b';
if(c=='p') return 'q';
return 'p';
}
int i,j,k,l,m,n,b;
int main(){
cin>>s;
for(i=0;i<s.size()){
g+=hs(s[s.zize()-i-1]);
}
if(s==g) cout<<"Yes";
else cout<... | a.cc: In function 'int main()':
a.cc:13:23: error: expected ';' before ')' token
13 | for(i=0;i<s.size()){
| ^
| ;
a.cc:14:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'zize'; did you mean 'size'?
14 | ... |
s418130671 | p03889 | C++ | #include<cstring>
#include<cstdio>
char s[100007];
int ch[128],i=1;
int main()
{
ch['p']=1,ch['d']=2,ch['q']=3;
scanf("%s",s+1);
for(l=strlen(s+1);i<=(l>>1)+1;++i)
if(ch[s[i]]^((ch[s[l-i+1]]+2)%4))
{printf("No\n");break;}
printf("Yes\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:11:9: error: 'l' was not declared in this scope
11 | for(l=strlen(s+1);i<=(l>>1)+1;++i)
| ^
|
s735779902 | p03889 | C++ | #include<bits/stdc++.h>
char s[100007];
int g[128];
int main()
{
g['b'] = 0 , g['p'] = 1 , g['d'] = 2 , g['q'] = 3;
scanf("%s",s+1);
for(int l = strlen(s+1),i=1;i<=(l>>1)+1;i++)
{
if(get[s[i]]^((get[s[l-i+1]]+2)%4)) return printf("No\n"),0;
}
return printf("Yes\n"),0;
} | a.cc: In function 'int main()':
a.cc:10:12: error: 'get' was not declared in this scope; did you mean 'std::get'?
10 | if(get[s[i]]^((get[s[l-i+1]]+2)%4)) return printf("No\n"),0;
| ^~~
| std::get
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
... |
s569879179 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
string b=s;
reverse(s.begin(),s.end());
for(int i=0; i<s.size();i++)
{
if(s[i]=='b') s[i]='d';
else if(s[i]=='d') s[i]='b';
else if(s[i]=='p') s[i]='q';
else if(s[i]=='q') s[i]='p';
}
if(a==b)
cout<<"Yes"<<"\n";
else
cout<<"... | a.cc: In function 'int main()':
a.cc:16:12: error: 'a' was not declared in this scope
16 | if(a==b)
| ^
|
s111921937 | p03889 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
char a[10002],b[10002];
int c;
gets(a);
for(int i=strlen(a)-1;i>=0;i--)
{
b[c]=a[i];
c++;
}
for(int i=0;i<strlen(a);i++)
{
if((a[i]=='b'&&b[i]!='d')||(a[i]=='d'&&b[i]!='b')||(a[i]=='p'&&b[i]!='q')||(a[i]=='q'&&b[i]!... | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(a);
| ^~~~
| getw
|
s951561535 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string s,s1;
cin>>s;
s1=reverse(s.begin(),s.end());
for(int i=0; i<a.size(); i++) {
if(s[i]=='b') s[i]='d';
else if(s[i]=='d') s[i]='b';
else if(s[i]=='p') s[i]='q';
else if(s[i]=='q') s[i]='p';
}
if(s==s1) {
cout<<"Yes"<<endl;
} else {
cout<<... | a.cc: In function 'int main()':
a.cc:6:37: error: no match for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'void')
6 | s1=reverse(s.begin(),s.end());
| ^
In file included from /usr/include/c++/14/string:54,
... |
s494234520 | p03889 | C++ | #include <cstdio>//头文件不解释
#include <iostream>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <iomanip>
#define rr register
#define int long long
#define f_for(i,a,b) for(rr int i=a;i<=b;i++)
using namespace std;
const int maxx=1e4;
int n,m;
string a,b;
int main()
{
cin>>a;
b=a;/... | cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:21:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
21 | for(rr int i=0; i<=len; i++)
| ^
a.cc:37:20: warning: ISO C++17 does not allow 'register' storage class specif... |
s376810720 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[100009];
int a[228];
int main()
{
int i;
a['b']=0;
a['p']=1;
a['d']=2;
a['q']=3;
scanf("%s",s+1);
for(i=strlen(s+1),i=1;i<=(i>>1)+1;i++)
{
if(a[s[i]]^((a[s[l-i+1]]+2)%4))
{
cout<<"No"<<endl;
return 0;
}
}
cout<<"Yes"... | a.cc: In function 'int main()':
a.cc:15:24: error: 'l' was not declared in this scope
15 | if(a[s[i]]^((a[s[l-i+1]]+2)%4))
| ^
|
s091261956 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string str;
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cin>>str;
string tmp=str;
reverse(str.begin(),str.end())
for(string::iterator it=str.begin();it!=str.end();++it)
switch(*it)
{
... | a.cc: In function 'int main()':
a.cc:11:35: error: expected ';' before 'for'
11 | reverse(str.begin(),str.end())
| ^
| ;
12 | for(string::iterator it=str.begin();it!=str.end();++it)
| ~~~
... |
s716941177 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s,a;
cin>>s;
a=reverse(s.begin(),s.end());
int len=s.size();
for(int i=0;i<len;i++)
{
if(s[i]=='p') s[i]=='q';
if(s[i]=='d') s[i]=='b';
}
if(s==a) cout<<"Yes";
else cout<<"No";
} | a.cc: In function 'int main()':
a.cc:7:36: error: no match for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'void')
7 | a=reverse(s.begin(),s.end());
| ^
In file included from /usr/include/c++/14/string:54,
... |
s535995086 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
string s;
int main()
{
cin>>s;
string b=s;
reverse(s.begin(),s.end());
for(int i=0;i<a.size();++i)
{
if(s[i]=='b')s[i]='d';
else if(s[i]=='d')s[i]='b';
else if(s[i]=='p')s[i]='q';
else if(s[i]=='q')s[i]='p';
}
if(s=... | a.cc: In function 'int main()':
a.cc:9:19: error: 'a' was not declared in this scope
9 | for(int i=0;i<a.size();++i)
| ^
|
s731975038 | p03889 | C++ | #include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
string s;
cin >> s;
string t = "";
string r = s;
reverse(s.begin(), s.end());
for (int i = 0; i < r.length(); i++) {
if (r[i] == 'b') t += 'd';
else if (r[i] == 'd') t += 'b';
else if ... | a.cc: In function 'int main(int, char**)':
a.cc:11:5: error: 'reverse' was not declared in this scope
11 | reverse(s.begin(), s.end());
| ^~~~~~~
|
s936392412 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a;
char k;
cin>>a;
string b="";
for(int i=a.length()-1;i>=0;i--)
{
k=a[i];
switch(k)
{
case 'b':b+="d";
case 'd':b+="b";
case "p":b+="q";
case 'q':b+="p";
... | a.cc: In function 'int main()':
a.cc:15:18: error: conversion from 'const char*' to 'int' in a converted constant expression
15 | case "p":b+="q";
| ^~~
a.cc:15:18: error: could not convert '"p"' from 'const char [2]' to 'int'
15 | case "p":b+="q";
| ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.