submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s157821446 | p04012 | C | #include<stdio.h>
int main(void){
char a[100],alf[2][30]={{abcdefghijklmnopqrstuvwxyz},{0}};
int cnt=0;
scanf("%s",&a);
for(int i=0;a[i]!='\0';i++){
for(int j=0;alf[1][j]!='\0';j++){
if(a[i]==alf[1][j]){
alf[2][j]++;
}
}
}
i=0;
while(alf[2][i]!='\0'){
if((alf[2][i]%2)==1... | main.c: In function 'main':
main.c:3:28: error: 'abcdefghijklmnopqrstuvwxyz' undeclared (first use in this function)
3 | char a[100],alf[2][30]={{abcdefghijklmnopqrstuvwxyz},{0}};
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:3:28: note: each undeclared identifier is reported only once for ... |
s728645289 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina c... | a.cc: In function 'int main()':
a.cc:25:20: error: expected primary-expression before ')' token
25 | if(s[j] == f;)
| ^
|
s380911917 | p04012 | C++ | //#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
const int INF= 1e9+5;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>>vvi;
int main(){
string s=qwertyuiopasdfghjklzxcvbnm;
string w;
cin>>w;
for(int i=0;i<26;i++){
int count=0;
for(int j=0;j<w.size();j++){
... | a.cc: In function 'int main()':
a.cc:11:12: error: 'qwertyuiopasdfghjklzxcvbnm' was not declared in this scope
11 | string s=qwertyuiopasdfghjklzxcvbnm;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
|
s002501293 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
main(){
string s;cin<<s;
map<char,int> m;
for(auto e:s)m[e]++;
bool f=0;
for(auto e:m)f|=e.second;
cout>>(f&1 ? "No":"Yes");} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
... |
s902748693 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int sum;
for(char c = 'a'; c < 'z'; c++){
int count = 0;
for(int i = 0; i < s.size(); s++){
if(s.at(i) == c){
count++;
}
}
if(count%2 = 1){
sum++;
}
}
if(s... | a.cc: In function 'int main()':
a.cc:10:37: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
10 | for(int i = 0; i < s.size(); s++){
| ~^~
a.cc:15:15: error: lvalue required as left operand of assignment
15 | if(count%2 = 1){
| ... |
s568301069 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int count;
int s = 0;
for(int i=0;i<s.size();i++){
count = 0;
for(int j=i+1;j<s.size();j++){
if(s.at(i)==s.at(j)){
count++;
}
}
if(count%2 ==1){
s = 1;
}
}... | a.cc: In function 'int main()':
a.cc:8:9: error: conflicting declaration 'int s'
8 | int s = 0;
| ^
a.cc:5:16: note: previous declaration as 'std::string s'
5 | string s;
| ^
a.cc:20:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__... |
s919881280 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int s = w.length;
string kai = "Yes";
if(s % 2 > 0)
{
kai = "No";
}
else
{
sort(w.begin(),w.end());
for(int i = 0;i < s;i += 2)
{
if(w.at(i) != w.at(i+1))
{
kai = "No";
}
}
}
cout << kai << endl;
}
| a.cc: In function 'int main()':
a.cc:7:19: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
7 | ... |
s446915620 | p04012 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#incldue <map>
using namespace std;
typedef long long ll;
#define rep(i,n) for (int i=0;i < (int)(n);i++)
int main(){
string s;
cin >> s;
map<char,int> m;
int sum=0;
for (int i =0;i < s.size();i++){
if (m.count(s[i])){
... | a.cc:5:2: error: invalid preprocessing directive #incldue; did you mean #include?
5 | #incldue <map>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:13:3: error: 'map' was not declared in this scope
13 | map<char,int> m;
| ^~~
a.cc:5:1: note: 'std::map' is defined in header '<map... |
s855115432 | p04012 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
#define rep(i,n) for (int i=0;i < (int)(n);i++)
int main(){
string s;
cin >> s;
map<char,int> m;
int sum=0;
for (int i =0;i < s.size();i++){
if (m.count(s[i])){
m[s[i]]++;... | a.cc: In function 'int main()':
a.cc:12:3: error: 'map' was not declared in this scope
12 | map<char,int> m;
| ^~~
a.cc:5:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
4 | #include <algorithm>
+++ |+#include <map>
5 | using namespace std;
a.... |
s346220461 | p04012 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sin = new Scanner(System.in);
String w = sin.nextLine();
if(w.length%2 == 0){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} | Main.java:7: error: cannot find symbol
if(w.length%2 == 0){
^
symbol: variable length
location: variable w of type String
1 error
|
s680393257 | p04012 | C++ | #include <iostream>
#include <string>
#include <map>
using namespace std;
int main(void)
{
string w; cin >> w;
map<char, int> counter;
rep(i, 0, w.length())counter[w[i]]++;
bool flag = true;
map<char, int>::iterator it;
for (it = counter.begin(); it != counter.end(); it++) {
if (it->second % 2 != 0) {
flag =... | a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
9 | rep(i, 0, w.length())counter[w[i]]++;
| ^
a.cc:9:9: error: 'rep' was not declared in this scope
9 | rep(i, 0, w.length())counter[w[i]]++;
| ^~~
|
s107274213 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int c, d[100];
for(int i = 0; i < 100; i++)
d[i] = 0;
string s;
bool b;
b = true;
cin >> s;
for(int i = 0, i < s.size(); i++){
if(s[i] == '.') continue;
for(int j = i; j < s.size(); j++){
if(s[i] == s[j]){
d[i]++;
... | a.cc: In function 'int main()':
a.cc:12:19: error: expected ';' before '<' token
12 | for(int i = 0, i < s.size(); i++){
| ^~
| ;
a.cc:12:20: error: expected primary-expression before '<' token
12 | for(int i = 0, i < s.size(); i++){
| ^... |
s384884585 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string w;
cin>>w;
map<char,int> m;
for(int i=0;i<w.size();i++){
char x=w.at(i);
if(!m.count(x)){
m.at(x)=1;
}else{
m.at(x)++;
}
}
bool flag=true;
for(int i:m){
if(i%2==1){
flag=false;
break;
... | a.cc: In function 'int main()':
a.cc:20:13: error: cannot convert 'std::pair<const char, int>' to 'int' in initialization
20 | for(int i:m){
| ^
a.cc:26:6: error: 'falg' was not declared in this scope; did you mean 'flag'?
26 | if(falg){
| ^~~~
| flag
|
s476285104 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string w;
cin>>w;
map<char,int> m;
for(int i=0;i<w.size();i++){
char x=w.at(i);
if(!m.count(x)){
m.at(x)=1;
}else{
m.at(x)++;
}
}
flag=true;
for(int i:m){
if(i%2==1){
flag=false;
break;
}
... | a.cc: In function 'int main()':
a.cc:19:3: error: 'flag' was not declared in this scope
19 | flag=true;
| ^~~~
a.cc:20:13: error: cannot convert 'std::pair<const char, int>' to 'int' in initialization
20 | for(int i:m){
| ^
a.cc:26:6: error: 'falg' was not declared in this scope
2... |
s859264866 | p04012 | C | i;main(j){for(;j=getchar())>96;i^=j);puts("No\0Yes"+!i*3);} | main.c:1:1: warning: data definition has no type or storage class
1 | i;main(j){for(;j=getchar())>96;i^=j);puts("No\0Yes"+!i*3);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
1 | i;main(j){for(;j=getc... |
s116239343 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
stirng w; cin >> w;
bool f[256] = {};
for (char c : w) {
f[c] ^= 1;
}
bool ans = 0;
for (int i = 0; i < 256; i++) ans ^= f[i];
cout << (ans ? "No" : "Yes") << endl;
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'stirng' was not declared in this scope
4 | stirng w; cin >> w;
| ^~~~~~
a.cc:4:20: error: 'w' was not declared in this scope
4 | stirng w; cin >> w;
| ^
|
s597015187 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
vector<char> t(s.size(),'a');
for(int i = 0; i < s.size(); i++)
t[i] == s[i];
sort(t.begin(),t.end());
bool even = true;
for(int i = 0; i < s.size() - 3; i += 2){
if(t[i] != t[i + 1])
even = false;
if(!((even))
... | a.cc: In function 'int main()':
a.cc:14:17: error: expected ';' before 'break'
14 | if(!((even))
| ^
| ;
15 | break;
| ~~~~~
a.cc:16:3: error: expected primary-expression before '}' token
16 | }
| ^
a.cc:15:14: error: expected '... |
s223997531 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
vector<char> t(s.size(),'a');
for(int i = 0; i < s.size(); i++)
t[i] == s[i];
sort(t.begin(),t.end());
bool even == true;
for(int i = 0; i < s.size() - 3; i += 2){
if(t[i] != t[i + 1])
even = false;
if(!((even))
... | a.cc: In function 'int main()':
a.cc:10:13: error: expected initializer before '==' token
10 | bool even == true;
| ^~
a.cc:13:7: error: 'even' was not declared in this scope
13 | even = false;
| ^~~~
a.cc:14:11: error: 'even' was not declared in this scope
14 | if(!((... |
s791729497 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
vector<string> t(s.size(),'a');
for(int i = 0; i < s.size(); i++)
t[i] == s[i];
sort(t.begin(),t.end());
bool even == true;
for(int i = 0; i < s.size() - 3; i += 2){
if(t[i] != t[i + 1])
even = false;
if(!((even))
... | a.cc: In function 'int main()':
a.cc:6:32: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::vector(std::__cxx11::basic_string<char>::size_type, char)'
6 | vector<string> t(s.size(),'a');
| ^
In file included from /usr/include/c++/14/vect... |
s971054923 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin > s;
vector<string> t(s.size(),'a');
for(int i = 0; i < s.size(); i++)
t[i] == s[i];
sort(t.begin(),t.end());
bool even == true;
for(int i = 0; i < s.size() - 3; i += 2){
if(t[i] != t[i + 1])
even = false;
if(!((even))
... | a.cc: In function 'int main()':
a.cc:5:7: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
5 | cin > s;
| ~~~ ^ ~
| | |
| | std::string {aka std::__cxx11::basic_string<char... |
s339070173 | p04012 | C++ | #includ<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin > s;
vector<string> t(s.size(),'a');
for(int i = 0; i < s.size(); i++)
t[i] == s[i];
sort(t.begin(),t.end());
bool even == true;
for(int i = 0; i < s.size() - 3; i += 2){
if(t[i] != t[i + 1])
even = false;
if(!((even))
... | a.cc:1:2: error: invalid preprocessing directive #includ; did you mean #include?
1 | #includ<bits/stdc++.h>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:4:1: error: 'string' was not declared in this scope
4 | string s;
| ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<... |
s684057225 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
vector<int> v(26,0);
int main(){
string s;
cin>>s;
for(auto a:s){
v[a-'a']++;
}
for(auto a:v){
if(a&1){
cout<"No";
}
}
cout<<"Yes";
} | a.cc: In function 'int main()':
a.cc:14:11: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]')
14 | cout<"No";
| ~~~~^~~~~
| | |
| | const char [3]
| std::ostream {aka std::basic_ostream<... |
s194353113 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define pb push_back
#define f(i,n) for(i=0;i<n;i++)
#define F(i,a,b) for(i=a;a<=b;i++)
#define arr(a,n) for( i=0;i<n;i++)cin>>a[i];
#define fi first
#define se second
#define mp make_pair
#define mod 1000000007
#define YES cout<<"YES... | a.cc: In function 'int main()':
a.cc:49:14: error: expected ';' before '}' token
49 | m[s[i]]++
| ^
| ;
50 | }
| ~
|
s876202348 | p04012 | C++ | #include <iostream>
#include <string>
#include <map>
using namespace std;
int main(){
string w;
cin>>w;
map<char,int>mp;
for(const auto c : w){
++mp[c];
}
for(const auto e : mp){
if(e%2==1){
puts("No");
return 0;
}
}
puts("Yes");
}
| a.cc: In function 'int main()':
a.cc:13:9: error: no match for 'operator%' (operand types are 'const std::pair<const char, int>' and 'int')
13 | if(e%2==1){
| ~^~
| | |
| | int
| const std::pair<const char, int>
|
s396650764 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
map<char, int> m;
string s;
cin >> s;
for(int i = 0; i < s.size(); ++i){
if(m.count(s[i])) ++s[i];
else m[s[i]] = 1;
}
bool b = 1;
for(char c: m){
if(m[c] % 2 == 1){
b = 0;
break;
}
}
if(b) cout << "Yes" << endl;
... | a.cc: In function 'int main()':
a.cc:13:15: error: cannot convert 'std::pair<const char, int>' to 'char' in initialization
13 | for(char c: m){
| ^
|
s527711595 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll=long long;
void solve(){
string w;
cin>>w;
if(int(w.size())%2==0){
cout<<"No"<<endl;
return;
}
sort(w.begin(), w.end());
for(int i=0; i<w.size(); i+=2){
if(w[i]!=[i+1]){
cout<<"No"<<endl;
return;
}
}
cout<<"Yes"<<endl;
}
signed main(){
//... | a.cc: In function 'void solve()':
a.cc:15:28: error: expected ',' before '+' token
15 | if(w[i]!=[i+1]){
| ^
| ,
a.cc:15:28: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:15:31: error: expected '{' before '... |
s085926985 | p04012 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_map>
#include <map>
using namespace std ;
int main(){
string w;
cin >> w;
int n = w.size();
vector<int> memo(26, 0);
for(int i=0; i... | a.cc: In function 'int main()':
a.cc:20:14: error: 't' was not declared in this scope
20 | memo[t] += 1;
| ^
|
s695824509 | p04012 | C++ | #include<bits/stdc++.h>
#include<string.h>
using namespace std;
int main(){
string s;
cin >> s;
bool even = true;
for (char c='a'; c<='z'; c++){
int cnt = 0;
for (int i=0; i<len(s); i++){
if (s[i]==c){
cnt++;
}
}
if (cnt%2==1) even = false;
}
cout << ( even?"Y... | a.cc: In function 'int main()':
a.cc:14:21: error: 'len' was not declared in this scope
14 | for (int i=0; i<len(s); i++){
| ^~~
|
s404132053 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
bool even = true;
for (char c='a'; c<='z'; c++){
int cnt = 0;
for (int i=0; i<len(s); i++){
if (s[i]==c){
cnt++;
}
}
if (cnt%2==1) even = false;
}
cout << ( even?"Yes":"NO") << endl;
... | a.cc: In function 'int main()':
a.cc:13:21: error: 'len' was not declared in this scope
13 | for (int i=0; i<len(s); i++){
| ^~~
|
s341955825 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
bool even = true;
for (char c='a'; c<='z'; c++){
int cnt = 0;
for (int i=0; i<lec(s); i++){
if (s[i]==c){
cnt++;
}
}
if (cnt%2==1) even = false;
}
cout << ( even?"Yes":"NO") << endl;
... | a.cc: In function 'int main()':
a.cc:13:21: error: 'lec' was not declared in this scope
13 | for (int i=0; i<lec(s); i++){
| ^~~
|
s077272415 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string w;
cin >> w;
int cnta=0;
int cntb=0;
int cntc=0;
int cntd=0;
int cnte=0;
int cntf=0;
int cntg=0;
int cnth=0;
int cnti=0;
int cntj=0;
int cntk=0;
int cntn=0;
int cntm=0;
int cntl=0;
int cnto=0;
int cntp=0;
int cntq=0... | a.cc: In function 'int main()':
a.cc:131:4: error: expected '}' at end of input
131 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s442536304 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
cin>>a;
int m[26] = {0};
for(int i = 0; i < s.size(); i++)
{
m[a[i]-'a']++;
}
bool flag = true;
for(int i = 0; i < 26; i++)
{
if(m[i] % 2 != 0)
{
flag = false;
break;
}
... | a.cc: In function 'int main()':
a.cc:9:28: error: 's' was not declared in this scope
9 | for(int i = 0; i < s.size(); i++)
| ^
|
s913172435 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
cin>>a;
int m[26] = {0};
for(int i = 0; i < s.size(); i++)
{
m[a[i]-'a']++;
}
bool flag = true;
for(int i = 0; i < 26; i++)
{
if(m[i] % 2 != 0)
{
flag = false;
break;
}
... | a.cc: In function 'int main()':
a.cc:9:28: error: 's' was not declared in this scope
9 | for(int i = 0; i < s.size(); i++)
| ^
|
s718183199 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) x.begin(),x.end()
const int INF = 100100100;
typedef long long ll;
int main() {
string w;
cin >> w;
sort(all(w));
string ans="Yes";
for(int i=0;i<w.size()-1;i+=2){
string s=w.substr(i... | a.cc: In function 'int main()':
a.cc:18:24: error: expected '}' at end of input
18 | cout << ans << endl;
| ^
a.cc:8:12: note: to match this '{'
8 | int main() {
| ^
|
s543116325 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string w;
cin >> w;
vector<int>counter(w.size());
for(int i = 0; i < w.size(); i ++){
for(int j = 0; j <= i; j ++){
if(w.at(i) == w.at(j)){
counter.at(j) ++;
break;
}
}
}
bool hantei = false;
for(int i... | a.cc: In function 'int main()':
a.cc:20:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig... |
s750077085 | p04012 | C | #include<bits/stdc++.h>
using namespace std;
using ll =long long;
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define SORT(i) sort((i).begin(),(i).end())
constexpr int INF = 2000000000;
constexpr int mod = 1000000007;
template<class T>inline bool chmin(T & a, T b) {
if (a > b) {
... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s828335476 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
vector<int> n(100);
for(int i=0; i<s.size(); i++){n.at((int)(s.at(i)))++;}
for(int i-0; i<100; i++){
if(n.at(i)%2==1){
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before '-' token
8 | for(int i-0; i<100; i++){
| ^
| ;
a.cc:8:21: error: expected ')' before ';' token
8 | for(int i-0; i<100; i++){
| ~ ^
| )
a.cc:8:23: error: ... |
s788740906 | p04012 | C | #include<stdio.h>
#include<cstring>
int main(){
int sign[50]={0};
int flag=0;
char a[101];
scanf("%s", a);
for(int i=0;i<=strlen(a);i++){
sign[a[i]-'a']++;
}
for(int j=0;j<=24;j++){
if(sign[j]%2!=0){
flag++;
break;
}
}
if(flag==0)
printf("Yes");
else
printf("No");
return 0;
} | main.c:2:9: fatal error: cstring: No such file or directory
2 | #include<cstring>
| ^~~~~~~~~
compilation terminated.
|
s525501965 | p04012 | C | #include<stdio.h>
#include<cstring>
int main(){
int sign[50]={0};
int flag=0;
char a[111];
scanf("%s", a);
for(int i=1;i<=strlen(a);i++){
sign[a[i]-'a']++;
}
for(int j=1;j<=strlen(a);j++){
if(sign[j]%2!=0){
flag=1;
break;
}
}
if(flag==0)
printf("Yes");
else
printf("No");
return 0;
} | main.c:2:9: fatal error: cstring: No such file or directory
2 | #include<cstring>
| ^~~~~~~~~
compilation terminated.
|
s252442289 | p04012 | C++ | #include<stdio.h>
#include<cstring>
#include<cmath>
int main(){
int sign[30]={0},flag;
char a[101];
gets(a);
for(int i=1;i<=strlen(a);i++){
sign[a[i]-'a']++;
}
for(int j=1;j<=strlen(a);j++){
if(sign[j]%2!=0){
flag=1;
}
}
if(flag!=1)
printf("Yes");
else
printf("No");
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(a);
| ^~~~
| getw
|
s392076186 | p04012 | C++ | #include<stdio.h>
#include<cstring>
int main(){
int sign[30]={0},flag;
char a[101];
gets(a);
for(int i=1;i<=strlen(a);i++){
sign[a[i]-'a']++;
}
for(int j=1;j<=strlen(a);j++){
if(sign[j]%2!=0){
flag=1;
}
}
if(flag!=1)
printf("Yes");
else
printf("No");
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(a);
| ^~~~
| getw
|
s657405773 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#defin... | a.cc: In function 'int main()':
a.cc:258:28: error: no matching function for call to 'std::vector<std::vector<long long int> >::vector(std::string&, std::vector<long long int>)'
258 | V<V<int>> b(a,V<int>(4,0));
| ^
In file included from /usr/include/c++/14/vector:66,
... |
s729720287 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
int main(){
string s;
cin>>s;
sort(s.begin(),s.end());
for(i=0;i<s.size()-1;i+=2){
if(s[i]!=s[i+1]){
cout<<"No";
return 0;
}
}
cout<<"Yes";
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
8 | for(i=0;i<s.size()-1;i+=2){
| ^
|
s425777562 | p04012 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int main()
{
string s;
cin >> s;
int hash[27] = { 0 };
for (int i = 0; i < s.length(); i++)
{
hash[s[i] - 'a']++;
}
bool valid = true;
for (int i = 0; i < 27; i++)
{
if (hash[i] % 2 != 0) valid = false
}
if (valid) cout << "Yes" ... | a.cc: In function 'int main()':
a.cc:20:44: error: expected ';' before '}' token
20 | if (hash[i] % 2 != 0) valid = false
| ^
| ;
21 | }
| ~
|
s805578771 | p04012 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int main()
{
string s;
cin >> s;
int hash[27] = 0;
for (int i = 0; i < s.length(); i++)
{
hash[s[i] - 'a']++;
}
bool valid = true;
for (int i = 0; i < 27; i++)
{
if (hash[i] % 2 != 0) valid = false
}
if (valid) cout << "Yes" << e... | a.cc: In function 'int main()':
a.cc:11:18: error: array must be initialized with a brace-enclosed initializer
11 | int hash[27] = 0;
| ^
a.cc:20:44: error: expected ';' before '}' token
20 | if (hash[i] % 2 != 0) valid = false
| ^
... |
s525117090 | p04012 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int main()
{
string s;
cin >> s;
for (int i = 0; i < s.length(); i++)
{
hash[s[i] - 'a']++;
}
bool valid = true;
for (int i = 0; i < 27; i++)
{
if (hash[i] % 2 != 0) valid = false
}
if (valid) cout << "Yes" << endl;
else cout << "No... | a.cc: In function 'int main()':
a.cc:13:15: error: expected ']' before '[' token
13 | hash[s[i] - 'a']++;
| ^
| ]
a.cc:13:25: error: expected initializer before '++' token
13 | hash[s[i] - 'a']++;
| ^~
a.cc:13:25: error: expecte... |
s895139019 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
#define rep(i, n) for(int i = 0; i < (n); i++)
int int_len(int n) {
int s=0;
while(n!=0) s++, n/=10;
return s;
}
int int_sum(int n) {
int m=0,s=0,a=n;
while(a!=0) s++, a/=10;
for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow... | a.cc:75:16: error: macro "rep" requires 2 arguments, but only 1 given
75 | rep(auto a:mp){
| ^
a.cc:4:9: note: macro "rep" defined here
4 | #define rep(i, n) for(int i = 0; i < (n); i++)
| ^~~
a.cc: In function 'int main()':
a.cc:75:3: error: 'rep' was not declared in this sc... |
s718603979 | p04012 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
string s;
cin >> s;
vector<int> a(100,0);
for(int i = 0; i < s.size(); i++){
a[s[i] - 'a']++;
}
bool is_ugly = false;
for(int i = 0; i < a.size(); i++){
if(a % 2 == 1){
is_ugly = true;
break;
}
}
if(is_... | a.cc: In function 'int main()':
a.cc:16:10: error: no match for 'operator%' (operand types are 'std::vector<int>' and 'int')
16 | if(a % 2 == 1){
| ~ ^ ~
| | |
| | int
| std::vector<int>
|
s716121038 | p04012 | Java | import java.util.*;
class Main{
static int ugly = 0;
Scanner sc = new Scanner(System.in);
String nyuuryoku = sc.next();
String w = nyuuryoku;
static int wlen = w.length();
String wafter;
int wlenafter;
public static void judge(String okikaeruyatu){
wafter = w.replace(okikaeruyatu,"");
wlenafte... | Main.java:8: error: non-static variable w cannot be referenced from a static context
static int wlen = w.length();
^
Main.java:13: error: non-static variable wafter cannot be referenced from a static context
wafter = w.replace(okikaeruyatu,"");
^
Main.java:13: error: non-static variable w ... |
s785259500 | p04012 | Java | import java.util.*;
class Main{
public static void judge(String okikaeruyatu){
wafter = w.replace(okikaeruyatu,"");
wlenafter = wafter.length();
if((wlen - wlenafter) % 2 == 1){
ugly += 1;
}
}
public static void main(String[] args){
int ugly = 0;
Scanner sc = new Scanner(System.in);... | Main.java:5: error: cannot find symbol
wafter = w.replace(okikaeruyatu,"");
^
symbol: variable wafter
location: class Main
Main.java:5: error: cannot find symbol
wafter = w.replace(okikaeruyatu,"");
^
symbol: variable w
location: class Main
Main.java:6: error: cannot find symbol
... |
s177031939 | p04012 | Java | import java.util.*;
class Main{
public static void judge(String okikaeruyatu){
wafter = w.replace(okikaeruyatu,"");
wlenafter = wafter.length();
if((wlen - wlenafter) % 2 == 1){
ugly += 1;
}
}
public static void main(String[] args){
int ugly = 0;
Scanner sc = new Scanner(System.in);... | Main.java:51: error: reached end of file while parsing
}
^
1 error
|
s755100424 | p04012 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;
int main(){
string w;
cin >> w;
int s = 0;
sort(w.begin(), w.end());
if(w.size()==1){
cout << "No" << endl;
break;
}
for(int i = 1; i < w.size(); i++){
if(w[i-1]==w[i]){
s+... | a.cc: In function 'int main()':
a.cc:13:8: error: break statement not within loop or switch
13 | break;
| ^~~~~
|
s184367349 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int num(char x)
{
return (x-'a');
}
int main()
{
int a[26];
for(int i=0;i<26;i++)
{
a[i]=0;
}
int s;
cin>>s;
for(int i=0;i<s.size();i++)
{
a[num(s[i])]++;
}
for(int i=0;i<26;i++)
{
if(a[i]%2!=0)
{
cout<<"NO";
return 0;
... | a.cc: In function 'int main()':
a.cc:18:19: error: request for member 'size' in 's', which is of non-class type 'int'
18 | for(int i=0;i<s.size();i++)
| ^~~~
a.cc:20:12: error: invalid types 'int[int]' for array subscript
20 | a[num(s[i])]++;
| ^
|
s652885581 | p04012 | C++ | #include <bits/stdc++.h>
typedef unsigned long long int ull;
typedef long double ldb;
typedef long long int ll;
#define for01(k,n) for (ll i=k; i<n; i++)
#define for02(k,n) for (ll j=k; j<n; j++)
#define for03(k,n) for (ll k=k; k<n; k++)
#define for11(k,n) for (ll i=k; i<=n; i++)
#define for12(k,n) for (ll j=k... | a.cc: In function 'int main()':
a.cc:44:15: error: 'w' was not declared in this scope
44 | int len = w.length();
| ^
|
s742517742 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string str;
cin>>str;
for(char i='a';i<='z';i++)
{
int c=0;
for(int j=0;j<str.size();j++)
{
if(str.at(j)==i)
{
c++;
}
}
}
if((c%2!=0)?cout<<"No":cout<<"Y... | a.cc: In function 'int main()':
a.cc:18:9: error: 'c' was not declared in this scope
18 | if((c%2!=0)?cout<<"No":cout<<"Yes");
| ^
|
s676713989 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
#define ll long long
#define rep(i,n) for(int i=0 ; (n) >i; i++)
class Solution {
public:
int main() {
string str; cin >> str;
std::vector<int> v(26);
rep(i,str.size()){
int x = str[i] - 'a';
v... | /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
|
s851877783 | p04012 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main() {
string w; cin >> w;
sort(w.begin(), w.end());
if (w.length() % 2 == 1) {
cout << "No" << endl;
return 0;
{
for (int i = 0; i < w.length(); ++i) {
if (w[i * 2] != w[i * 2 + 1]) {
cout << "No" << endl;
return 0;
}
}
cout <... | a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:10:34: note: to match this '{'
10 | if (w.length() % 2 == 1) {
| ^
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:5:12: note: to match this... |
s945949355 | p04012 | C++ | #include <bits/stdc++>
using namespace std;
int main() {
string w; cin >> w;
sort(w.begin(), w.end());
for (int i = 0; i < w.length; ++i) {
if (w[i] != w[i + 1]) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
} | a.cc:1:10: fatal error: bits/stdc++: No such file or directory
1 | #include <bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s044398114 | p04012 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main() {
string w; cin >> w;
sort(w.begin(), w.end());
for (int i = 0; i < w.length; ++i) {
if (w[i] != w[i + 1]) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
} | a.cc: In function 'int main()':
a.cc:10:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns... |
s338700739 | p04012 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main() {
string w; cin >> w;
sort(w.begin(),w.end())
for (int i = 0; i < w.length; ++i) {
if (w[i] != w[i + 1]) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
} | a.cc: In function 'int main()':
a.cc:8:32: error: expected ';' before 'for'
8 | sort(w.begin(),w.end())
| ^
| ;
9 |
10 | for (int i = 0; i < w.length; ++i) {
| ~~~
a.cc:10:25: error: ... |
s810245707 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
stirng s;
int mp[300] = {};
cin >> s;
for(int i = 0;i < s.size();i++){
mp[s[i]]++;
}
for(int i = 'a';i <= 'z';i++){
if(mp[i]%2 == 1){
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'stirng' was not declared in this scope
5 | stirng s;
| ^~~~~~
a.cc:7:10: error: 's' was not declared in this scope
7 | cin >> s;
| ^
|
s511816056 | p04012 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 文字列の入力
List<String> sList = Arrays.asList(sc.next().split(""));
Collections.sort(sList);
int count = 0;
String lastChar = "";
String ans = "Yes";
... | Main.java:15: error: not a statement
count == 0;
^
1 error
|
s536812846 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
string s="";
int main(){
cin>>s;
bool flag=false;
map <char, int>mp;
for(int i=0;i<int(s.size())-1;i++){
mp[s[i]]++;
}
for(auto it=mp.begin();it!=mp.end();++it){if(it->second%2==1){flag=true;break}}
cout<<(flag?"No":"Yes")<<endl;
} | a.cc: In function 'int main()':
a.cc:11:82: error: expected ';' before '}' token
11 | for(auto it=mp.begin();it!=mp.end();++it){if(it->second%2==1){flag=true;break}}
| ^
| ... |
s933359678 | p04012 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <stdio.h>
using namespace std;
int main() {
string w; cin >> w;
sort(w.begin(), w.end());
for (int i = 0; i < w.length() / 2; ++i) {
if (w[i * 2 - 1] = l w[i * 2]) cout << "No" << endl; return 0;
}
cout << "Yes" << endl;
} | a.cc: In function 'int main()':
a.cc:12:36: error: 'l' was not declared in this scope
12 | if (w[i * 2 - 1] = l w[i * 2]) cout << "No" << endl; return 0;
| ^
a.cc:12:37: error: expected ')' before 'w'
12 | if (w[i * 2 - 1] = l w[i * 2]) cout... |
s680451433 | p04012 | C++ | #include <string>
using namespace std;
int main(){
string w;
cin >> w;
int L=w.size()-1;
sort(w.begin(),w.end());
int num=0;
int ans=0;
for(int i=0; i<L; i++){
if(w.at(i)==w.at(i+1)){
num++;
}
else{
if(num%2==0) ans++;
num=0;
}
}
if(ans>0) cout << "No" << endl;
el... | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> w;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <string>
+++ |+#include <iostream>
2 | using namespace std... |
s660292906 | p04012 | C++ | #include<bits/stdc++.h>
#include<string>
#include<set>
#include<iterator>
using namespace std;
int freq(set<char>::iterator it,string s)
{
int ans=0;
for(int i=0;i<s.length();i++)
{
if(*it == s[i])
ans++;
}
return ans;
}
int main()
{
string s;
cin >> s;int f;int cnt=0;
set<char> k;set<char>::i... | a.cc: In function 'int main()':
a.cc:23:11: error: no match for 'operator=' (operand types are 'std::set<char>::iterator' {aka 'std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>, std::allocator<char> >::const_iterator'} and 'int')
23 | for( it=0;it<k.size();it++)
| ^
In file included ... |
s282387908 | p04012 | C++ | #include<bits/stdc++.h>
#include<string>
#include<set>
#include<iterator>
using namespace std;
int freq(set<char>::iterator it; ptr,string s)
{
int ans=0;
for(int i=0;i<s.length();i++)
{
if(*it == s[i])
ans++;
}
return ans;
}
int main()
{
string s;
cin >> s;int f;int cnt=0;
set<char> k;set<cha... | a.cc:6:32: error: expected ')' before ';' token
6 | int freq(set<char>::iterator it; ptr,string s)
| ~ ^
| )
a.cc:6:34: error: 'ptr' does not name a type
6 | int freq(set<char>::iterator it; ptr,string s)
| ... |
s024800890 | p04012 | C++ | #include<bits/stdc++.h>
#include<string>
#include<set>
using namespace std;
int freq(char* ptr,string s)
{
int ans;
for(int i=0;i<s.length();i++)
{
if(*ptr == s[i])
ans++;
}
return ans;
}
int main()
{
string s;
cin >> s;int f;int cnt=0;
set<char> k;
for(int i=0;i<s.length();i++)
k.insert... | a.cc: In function 'int main()':
a.cc:22:28: error: could not convert '(it = k.std::set<char>::end())' from 'std::_Rb_tree_const_iterator<char>' to 'bool'
22 | for(auto it=k.begin();it =k.end();it++)
| ~~~^~~~~~~~
| |
| ... |
s550803907 | p04012 | C++ | #include<bits/stdc++.h>
#include<string>
#include<set>
using namespace std;
int freq(char* ptr,string s)
{
int ans;
for(int i=0;i<s.length();i++)
{
if(*ptr == s[i])
ans++;
}
return ans;
}
int main()
{
string s;
cin >> s;int f;int cnt=0;
set<char> k;
for(int i=0;i<s.length();i++)
k.insert... | a.cc: In function 'int main()':
a.cc:22:28: error: could not convert '(it = k.std::set<char>::end())' from 'std::_Rb_tree_const_iterator<char>' to 'bool'
22 | for(auto it=k.begin();it =k.end();it++)
| ~~~^~~~~~~~
| |
| ... |
s098274868 | p04012 | C++ | #include<bits/stdc++.h>
#include<string>
#include<set>
using namespace std;
int freq(*ptr,string s)
{
int ans;
for(int i=0;i<s.length();i++)
{
if(*ptr == s[i])
ans++;
}
return ans;
}
int main()
{
string s;
cin >> s;int f;int cnt=0;
set<char> k;
for(int i=0;i<s.length();i++)
k.insert(s[i]... | a.cc:5:11: error: 'ptr' was not declared in this scope
5 | int freq(*ptr,string s)
| ^~~
a.cc:5:22: error: expected primary-expression before 's'
5 | int freq(*ptr,string s)
| ^
a.cc:5:23: error: expression list treated as compound expression in initializer [-fpermissi... |
s070127450 | p04012 | C++ | #include<bits/stdc++.h>
#include<string>
#include<set>
using namespace std;
int main()
{
string s;
cin >> s;int f;int cnt=0;
set<char> k;
for(int i=0;i<s.length();i++)
k.insert(s[i]);
for(auto it=k.begin();it =k.end();it++)
{
f = freq(*it,s);
if(!(f&1))
cnt=cnt+f;
}
if(cnt == s.lengt... | a.cc: In function 'int main()':
a.cc:12:28: error: could not convert '(it = k.std::set<char>::end())' from 'std::_Rb_tree_const_iterator<char>' to 'bool'
12 | for(auto it=k.begin();it =k.end();it++)
| ~~~^~~~~~~~
| |
| ... |
s797073169 | p04012 | C++ | #include<bits/stdc++.h>
#include<string>
#include<set>
using namespace std;
int main()
{
string s;
cin >> s;int freq;int cnt=0;
set<char> k;
for(int i=0;i<s.length();i++)
k.insert(s[i]);
for(auto it=k.begin();it =k.end();it++)
{
f = freq(*it,s);
if(!(f&1))
cnt=cnt+f;
}
if(cnt == s.le... | a.cc: In function 'int main()':
a.cc:12:28: error: could not convert '(it = k.std::set<char>::end())' from 'std::_Rb_tree_const_iterator<char>' to 'bool'
12 | for(auto it=k.begin();it =k.end();it++)
| ~~~^~~~~~~~
| |
| ... |
s384807522 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
bool beautiful = true;
for(int i = 0; i < s.size(); i++){
int cnt = 0;
for(int j = 0; j < s.size(); j++){
if(s.at(i) == s.at(j)) cnt++;
}
if(cnt % 2 == 1){
beautiful = false;
break;
}
}
if(be... | a.cc: In function 'int main()':
a.cc:20:12: error: expected '}' at end of input
20 | return 0;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s503901884 | p04012 | C++ | #include <iostream>
using namespace std;
int main ()
{
string s;
cin>>s;
if (s.size()%2==0){
cout<<"Yes";
}
else cout<"No";
} | a.cc: In function 'int main()':
a.cc:10:11: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]')
10 | else cout<"No";
| ~~~~^~~~~
| | |
| | const char [3]
| std::ostream {aka std::basic_ostream<... |
s878993379 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
string w;
int count = 0; ans = 1;
int main () {
cin >> w;
if (w.size % 2 == 1)
cout << "No" << endl;
sort(w.begin(), w.end());
for(int i = 0; i < (w.size / 2); i++){
if(w[2*i] != w[2*i + 1]){
cout << "No" <<endl;
return 0;
}
}
cout... | a.cc:5:16: error: 'ans' does not name a type
5 | int count = 0; ans = 1;
| ^~~
a.cc: In function 'int main()':
a.cc:10:9: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with... |
s213170175 | p04012 | Java | import java.util.*;
class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
String W = sc.next();
int count = 0;
for(char i = 'a'; i <='z'; i++) {
for(int x = 0; x < W.length(); x++) {
if(W.charAt(x) == i) {
count += 1;
}
}
if(count % 2 != 0){
... | Main.java:19: error: reached end of file while parsing
}
^
1 error
|
s557429095 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s,ans;
cin >> s;
int n=s.size();
sort(s.begin(),s.end());
int count;
count=1;
for(int i=0;i<n-1;i++){
if(s[i]==s[i+1]){
count++;
}else{
if(count%2==1){
ans="No";
break;
... | a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
24 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s442144235 | p04012 | C++ | #include <bits/stdc++.h>
#include <set>
#include <tuple>
using namespace std;
int mid(int a,int b,int c){
return a+b+c-max(max(a,b),c)-min(min(a,b),c);
}//三つの要素の中央値を出力
int samecount(string S){
int A = 0;
for(int i = 0;i < S.size();i++){
int QA = 1;
for(int j = i ;j < S.size() - 1;j++){
... | a.cc:32:41: warning: multi-character character constant [-Wmultichar]
32 | int a = count(W.begin(),W.end(),'W[i]');
| ^~~~~~
a.cc: In function 'int main()':
a.cc:31:24: error: expected ')' before ';' token
31 | if(int i = 0;i < 27;i++){
| ~ ... |
s982214830 | p04012 | C++ | #include <bits/stdc++.h>
#include <set>
#include <tuple>
using namespace std;
int mid(int a,int b,int c){
return a+b+c-max(max(a,b),c)-min(min(a,b),c);
}//三つの要素の中央値を出力
int samecount(string S){
int A = 0;
for(int i = 0;i < S.size();i++){
int QA = 1;
for(int j = i ;j < S.size() - 1;j++){
... | a.cc:32:41: warning: multi-character character constant [-Wmultichar]
32 | int a = count(W.begin(),W.end(),'W[i]');
| ^~~~~~
a.cc: In function 'int main()':
a.cc:31:24: error: expected ')' before ';' token
31 | if(int i = 0;i < 27;i++){
| ~ ... |
s781314218 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int s[30] ;
for (int i = 0; i < 30; i++){
s[i] = 0;
}
int count, str,
for (int i = 0; i < w.size() ; i++) {
s[w[i]-'a']++;
}
for (int i = 0; i < 30; i++){
if (s[i] %... | a.cc: In function 'int main()':
a.cc:14:7: error: expected unqualified-id before 'for'
14 | for (int i = 0; i < w.size() ; i++) {
| ^~~
a.cc:14:23: error: 'i' was not declared in this scope
14 | for (int i = 0; i < w.size() ; i++) {
| ^
|
s138024414 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count, str, s[30];
for (int i = 0; i < w.size() ; i++) {
s[i] = 0;
s[w[i]-'a']++;
}
for (int i = 0; i < w.size(); i++){
if (a[i] %2 != 0){
str == 1;
break... | a.cc: In function 'int main()':
a.cc:17:12: error: 'a' was not declared in this scope
17 | if (a[i] %2 != 0){
| ^
|
s769280297 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count, str;
for (int i = 0; i < w.size() ; i++) {
a[w[i]-'a']++;
}
for (int = 0; i < w.size(); i++){
if (a[i] %2 != 0){
str == 1;
break;
}
}
... | a.cc: In function 'int main()':
a.cc:12:9: error: 'a' was not declared in this scope
12 | a[w[i]-'a']++;
| ^
a.cc:15:12: error: expected unqualified-id before '=' token
15 | for (int = 0; i < w.size(); i++){
| ^
a.cc:15:11: error: expected ';' before '=' token
15 | fo... |
s831319072 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
vector<char> vec(w.size());
sort(vec.begin(),vec.end());
int count;
for (int i = 0; i < w.size() ; i++) {
if(w[i-1] != w[i]){
continue;
}
}
if(i % 2 == 0){
... | a.cc: In function 'int main()':
a.cc:19:6: error: 'i' was not declared in this scope
19 | if(i % 2 == 0){
| ^
|
s218923759 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
vector<char> vec(w.size);
sort(vec.begin(),vec.end());
int count;
for (int i = 0; i < w.size() ; i++) {
if( (w.size()/2 == 0) && (w.at(i-1) == w.at(i))){
count++;
... | a.cc: In function 'int main()':
a.cc:7:22: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = ... |
s785426636 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
vector<char> vec(w.size);
sort(vec.begin(),vec.end())
int count;
for (int i = 0; i < w.size() ; i++) {
if( (w.size()/2 == 0) && (w.at(i-1) == w.at(i))){
count++;
... | a.cc: In function 'int main()':
a.cc:7:22: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = ... |
s666049460 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count;
for (int i = 0; i < w.size() ; i++) {
if( (w.size()/2 == 0) && (w.at(i-1) == w.at(i))){
count++;
}
else if (w.size()/2 == 0) && (w.at(i-1) != w.at(i)))... | a.cc: In function 'int main()':
a.cc:15:38: error: expected identifier before '(' token
15 | else if (w.size()/2 == 0) && (w.at(i-1) != w.at(i))){
| ^
|
s926913831 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count;
for (int i = 0; i < w.size() ; i++) {
if( (w.size()/2 == 0) && (w.at(i-1) == w.at(i))){
count++;
}
else if (w.size()/2 == 0) && (w.at(i-1) != w.at(i))... | a.cc: In function 'int main()':
a.cc:15:38: error: expected identifier before '(' token
15 | else if (w.size()/2 == 0) && (w.at(i-1) != w.at(i))){
| ^
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int ... |
s716928513 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count;
for (int i = 0; i < w.size() ; i++) {
if( (w.size()/2 == 0) && (w.at(i-1) == w.at(i))){
count++;
}
else if (w.size()/2 == 0) && (w.at(i-1) != w.at(i))... | a.cc: In function 'int main()':
a.cc:15:38: error: expected identifier before '(' token
15 | else if (w.size()/2 == 0) && (w.at(i-1) != w.at(i))){
| ^
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:9:43: note: to match this '{'
9 | ... |
s829687083 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int count;
for (int i = 0; i < w.size() ; i++) {
for(int j = 0; j < w.size() ;i++){
if( (w.size()/2 == 0) && (w.at(i) == w.at(j))){
count++;
}
}
}
if((count... | a.cc: In function 'int main()':
a.cc:17:12: error: lvalue required as left operand of assignment
17 | if((count/4 = 1 )|| (count/4 = 3)){
| ~~~~~^~
a.cc:17:29: error: lvalue required as left operand of assignment
17 | if((count/4 = 1 )|| (count/4 = 3)){
| ~~~~~^~
|
s052042259 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i,a) for(int i = 0; i < (a); i++)
#define ALL(a) (a).begin(),(a).end()
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const int MOD = 1e9 + 7;
signed main(){
string w;
cin >> w;
sort(ALL(w));
if(w.size() % 2 == 1){
... | a.cc: In function 'int main()':
a.cc:18:26: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns... |
s272256836 | p04012 | C++ | #include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
int main(){
string w;
cin>>w;
vecter<ll> a(26,0);
for(ll i=0;i<w.size();i++) a[w[i]]++;
for(ll i=0;i<26;i++){
if(a[i]%2!=0){
cout<<"No"<<endl;
break;
}
... | a.cc: In function 'int main()':
a.cc:9:5: error: 'vecter' was not declared in this scope
9 | vecter<ll> a(26,0);
| ^~~~~~
a.cc:9:14: error: expected primary-expression before '>' token
9 | vecter<ll> a(26,0);
| ^
a.cc:9:16: error: 'a' was not declared in this scope
9 | ... |
s681099246 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int count[500];
int main(){
string str;
cin >> str;
for(int i=0; i<str.length();i++){
count[str[i]]++;
}
bool No = false;
for(int i='a'; i<='z'; i++){
if(count[i] %2 != 0)
No = true;
}
if(NO) cout << "NO"<<endl;
else cout <<"YES"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:1: error: reference to 'count' is ambiguous
15 | count[str[i]]++;
| ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/pstl/glue_algo... |
s273470090 | p04012 | C++ | #include <iostream>
#include <vector>
#include <cstring>
#include <algorithm> // sort
#define REP(i, n) for (long long i = 0; i < (n); i++)
typedef long long ll;
static const ll MOD = 1000000007;
static const ll INF = 1000000000000000000LL;
using namespace std;
//arc044_c
// 隣り合う値がx以下
// 左から見ていって、右側を削ればよいのでは 右が0なら左を... | a.cc: In function 'int main()':
a.cc:31:10: error: 'tmp' was not declared in this scope; did you mean 'tm'?
31 | if(a[tmp] % 2 != 0)
| ^~~
| tm
|
s368877888 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int alp[26]={0};
int main(){
string w; cin>>w;
for(int i=0;i<w.length();i++){
alp[w.substr(i,1)-"a"]++;
}
for(int i=0;i<26;i++){
if(alp[i]%2!=0){
cout<<"No"<<endl;
return 0;
}
}
cout<<"Yes"<<endl;
} | a.cc: In function 'int main()':
a.cc:9:22: error: no match for 'operator-' (operand types are 'std::__cxx11::basic_string<char>' and 'const char [2]')
9 | alp[w.substr(i,1)-"a"]++;
| ~~~~~~~~~~~~~^~~~
| | |
| | const char [2]
| ... |
s858023694 | p04012 | C++ | #include<bits/stdc++.h>
using namespace std;
int alp[26]={0};
int main(){
string w; cin>>w;
for(int i=0;i<w.length();i++){
alp[w[i]-"a"]++;
}
for(int i=0;i<26;i++){
if(alp[i]%2!=0){
cout<<"No"<<endl;
return 0;
}
}
cout<<"Yes"<<endl;
} | a.cc: In function 'int main()':
a.cc:9:13: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char [2]' to binary 'operator-'
9 | alp[w[i]-"a"]++;
|
s620284734 | p04012 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define ub upper_bound
#define lb upper_bound
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a... | a.cc: In function 'bool solve()':
a.cc:63:35: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
63 | cout << ok ? "Yes" : "No" << endl;
| ~~~~~^~~~~~~
a.cc:64:1: warning: no return statement in function retu... |
s875761998 | p04012 | C++ | /*
*
* 1. sprawdz corner cases
* 2. sprawdz limity, jesli sie da pozamieniaj wszystkie lokalne zmienne na LL!
* 3. MINIMALNE I MAKSYMALNE WEJŚCIE I WYJŚCIE
* 4. lokalne zmienne, iteracja po tablicach dwuwymiarowych uwazaj
* 5. SPRAWDZ CZY input jest POSORTOWANY jaki jest niezmiennik
*
*
*/
#include <algo... | a.cc: In function 'int main()':
a.cc:112:20: error: no matching function for call to 'std::multiset<char>::count(std::multiset<char>&)'
112 | if (occ.count(occ) % 2 != 0) {
| ~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/set:64,
from a.cc:19:
/usr/include/c++/14/bits/... |
s025451975 | p04012 | C | #include <stdio.h>
#include <string.h>
int main(){
char r;
char s[101];
scanf("%s",s);
for(int i=0;i<strlen(s);i++){
for(int j=0;j<strlen(s);j++){
if(s[j]>s[j+1]){
r=s[j];
s[j]=s[j+1];
s[j+1]=r;
}
}
}
for(int i=0;i<strlen(s)-1;i++){
if(s[i]==s[i+1])c++;
el... | main.c: In function 'main':
main.c:17:21: error: 'c' undeclared (first use in this function)
17 | if(s[i]==s[i+1])c++;
| ^
main.c:17:21: note: each undeclared identifier is reported only once for each function it appears in
|
s431241478 | p04012 | C | #include <stdio.h>
#include <string.h>
int main(){
char r;
char s[101];
scanf("%s",s);
for(int i=0;i<strlen(s);i++){
for(int j=0;j<strlen(s);j++){
if(s[j]>s[j+1]){
r=s[j];
s[j]=s[j+1];
s[j+1]=r;
}
}
}
for(int i=0;i<strlen(s)-1;i++){
if(s[i]==i[i+1])c++;
el... | main.c: In function 'main':
main.c:17:15: error: subscripted value is neither array nor pointer nor vector
17 | if(s[i]==i[i+1])c++;
| ^
main.c:17:21: error: 'c' undeclared (first use in this function)
17 | if(s[i]==i[i+1])c++;
| ^
main.c:17:21: note: each und... |
s360645746 | p04012 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
string strIn,strOut;
cin>>strIn;
strOut="Yes";
char c=str[0];
int num=0;
if(strIn.size()%2==0){
strOut="No";
}else{
sort(strIn.begin(),strIn.end());
for(auto itr = strIn.begin(); itr != strIn.end();... | a.cc: In function 'int main()':
a.cc:10:10: error: 'str' was not declared in this scope; did you mean 'std'?
10 | char c=str[0];
| ^~~
| std
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.