submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s091664362 | p03698 | C++ | #include<bits/stdc++.h>
#include<cstring>
using namespace std;
int main()
{
string s;
cin>>s;
map<char,int>mp;
int i,count = 0,len = strlen(s);
if(len>=2 && len<=26)
{
for(i=0; i<s.size(); i++)
{
mp[s[i]]++;
}
for(i=97; i<=122; i++)
{
if(mp[i]>1)
... | a.cc: In function 'int main()':
a.cc:10:34: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
10 | int i,count = 0,len = strlen(s);
| ^
| |
| std::strin... |
s534931779 | p03698 | C | #include<stdio.h>
#include<string.h>
int main(){
char str[26];
char result[26] = {0};
int temp = 0;
int Flag = 0;
int len = 0;
scanf("%s",str);
len = strlen(str);
for(int i=0; i<len; i++){
result[str[i] - 'a']++;
}
for(int j=0; j<len; j++){
if(result[j] > 1{
printf("yes");
return 0;
}
}
pr... | main.c: In function 'main':
main.c:20:33: error: expected ')' before '{' token
20 | if(result[j] > 1{
| ~ ^
| )
main.c:24:9: error: expected expression before '}' token
24 | }
| ^
|
s978406068 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
string S;
cin >> S;
int N = S.size();
string ans = "yes";
for(int i = 0; i < N, i++) {
for(int j = i + 1; j < N; j++) {
if(S[i] == S[j]) {
ans == "no";... | a.cc: In function 'int main()':
a.cc:10:30: error: expected ';' before ')' token
10 | for(int i = 0; i < N, i++) {
| ^
| ;
a.cc:13:21: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Alloca... |
s237204277 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin>>s;
int n=s.size();
string ans="yes";
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
if(s[i]==s[j]) ans="no"<<endl;
}
}
cout<<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:11:30: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
11 | if(s[i]==s[j]) ans="no"<<endl;
| ~~~~^~~~~~
|
s274662062 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
for (int i=0;i<n;++i){
for (int j=0;j<n;++j){
if (s[i]!=s[j]){
cout << "yes" << endl;
}
else cout << "no" << endl;
}
}
} | a.cc: In function 'int main()':
a.cc:8:18: error: 'n' was not declared in this scope
8 | for (int i=0;i<n;++i){
| ^
|
s797377366 | p03698 | C++ | #include<bits/stdc++.h>
#define int long long
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
#define mod 1e9
int32_t main() {
string s;
int f=1;
map<char ,int> mp;
for(auto c:s)
{ if(mp[c])
f=0;
mp[c]++
}
if(f)
cout<<"Yes\n";
else cout<<"No\n"... | a.cc: In function 'int32_t main()':
a.cc:13:11: error: expected ';' before '}' token
13 | mp[c]++
| ^
| ;
14 | }
| ~
|
s090474192 | p03698 | C++ | #include <bits/stdc++.h>
#define ALL(obj) begin(obj), end(obj)
#define debug(x) cerr << #x << ": " << x << '\n'
using namespace std;
template <class T>
vector<T> make_vec(size_t a) {
return vector<T>(a);
}
template <class T, class... Ts>
auto make_vec(size_t a, Ts... ts) {
return vector<decltype(make_vec<T>(ts.... | a.cc: In function 'int main()':
a.cc:50:15: error: 'class std::set<char>' has no member named 'cout'; did you mean 'count'?
50 | if (s.cout(c)) {
| ^~~~
| count
|
s436168604 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep1(i, n) for(int i = 1; i < n+1; i++)
#define sort(A) sort(A.begin(),A.end())
#define reverse(A) reverse(A.begin(),A.end());
#define vecmin(A) *min_element(A.begin(),A.end());
#define vecmax(A) *max_element(A.begin(),A.... | a.cc: In function 'int maim()':
a.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
18 | }
| ^
/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 exi... |
s565129626 | p03698 | C++ | #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a ... | a.cc: In function 'int main()':
a.cc:75:24: error: expected ';' before 'return'
75 | else puts("No")
| ^
| ;
76 | return 0;
| ~~~~~~
|
s263634832 | p03698 | C++ | #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a ... | a.cc: In function 'int main()':
a.cc:67:33: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
67 | string str = s[i];
| ^
a.c... |
s387907436 | p03698 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String S = sc.next();
String c[] = new String[S.length];
for(int i=0;i<S.length();i++){
c[i]=S.substring(i,i+1);
}
Arrays.sort(c);
for(int i=0;i<S.length()-1;i++){
... | Main.java:6: error: cannot find symbol
String c[] = new String[S.length];
^
symbol: variable length
location: variable S of type String
1 error
|
s894427756 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string str;
cin >> str;
sort(str.begin(), str.end());
for(int i=0; i+1<str.size; i++){
if(str[i]==str[i+1]){
cout <<"no"<<endl;
}
}
cout << "yes"<<endl;
} | a.cc: In function 'int main()':
a.cc:8: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 unsign... |
s537299946 | p03698 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
#define dunk(a) cout << (a) << endl
#define rall(a) (a).rbegin(),(a).rend()
const int INF = 2e9;
using namespace std;
using Graph = vector<vector<int>>;
typedef pair<int,int> P;
typedef long long ll;
int main(){
st... | a.cc: In function 'int main()':
a.cc:16:13: 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... |
s930443551 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
int a[26]={0};
string s;
cin>>s;
for(int i=0;i<s.length();i++)a[s[i]-'a']++;
for(int i=0;i<26;i++){
if(a[i]>1)f=1;
}
int f=0;
if(f==1)cout<<"no";
else cout<<"yes";
return 0;
} | a.cc: In function 'int main()':
a.cc:11:19: error: 'f' was not declared in this scope
11 | if(a[i]>1)f=1;
| ^
|
s421673347 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
int main(){
string s; cin >> s;
int n = s.size();
bool flag = false
rep(i,n){
for(int j = i+1; j < n; j++){
if(s[i]==s[j]){
flag = true;
break;
}
... | a.cc: In function 'int main()':
a.cc:3:18: error: expected ',' or ';' before 'for'
3 | #define rep(i,n) for(int i=0;i<(int)(n);i++)
| ^~~
a.cc:8:5: note: in expansion of macro 'rep'
8 | rep(i,n){
| ^~~
a.cc:8:9: error: 'i' was not declared in this scope
8 | rep(i,n){... |
s591530532 | p03698 | C++ | s = input()
flag = "yes"
for i in s:
if s.count(i) != 1:
flag = "no"
print(flag) | a.cc:1:1: error: 's' does not name a type
1 | s = input()
| ^
|
s266699615 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int al[26,0];
bool ans = true;
for (int i = 0; i < S.size(); i++) {
al[S[i] - 97]++;
}
for (int i = 0; i < 26; i++) {
if (al[i] >= 2) ans = false;
}
if(ans) cout << "yes" << endl;
else cout << "no" << endl;
ret... | a.cc: In function 'int main()':
a.cc:6:12: error: expected ']' before ',' token
6 | int al[26,0];
| ^
| ]
a.cc:6:13: error: expected unqualified-id before numeric constant
6 | int al[26,0];
| ^
a.cc:9:5: error: 'al' was not declared in this scope
9 | ... |
s164690387 | p03698 | C++ | /*
このコード、と~おれ!
Be accepted!
∧_∧
(。・ω・。)つ━☆・*。
⊂ ノ ・゜+.
しーJ °。+ *´¨)
.· ´¸.·*´¨) ¸.·*¨)
(¸.·´ (¸.·'* ☆
*/
#include <cstdio>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstring>
#include <vector>
#include <numeric>
#include <iostream>
#include <random>
#include <map... | a.cc: In function 'int main()':
a.cc:128:19: error: 'class std::set<char>' has no member named 'push'
128 | t.push(aa);
| ^~~~
|
s526627759 | p03698 | C++ | #include <bits/stdc++.h>
int main()
{
string s;
cin>>s;
int h[26],i;
for(i=0;i<26;++i)
h[i]=0;
for(i=0;i<s.length();++i)
{
h[s[i]-97]++;
}
for(i=0;i<26;++i)
{
if(h[i]>1)
break;
}
if(i==26)
printf("yes");
else
printf("no");
} | a.cc: In function 'int main()':
a.cc:5:4: error: 'string' was not declared in this scope
5 | string s;
| ^~~~~~
a.cc:5:4: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linu... |
s364180237 | p03698 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
using namespace std;
typedef long long ll;
ll MOD = 1e9+7;
#define rep(i,n) for(int i = 0; i < (n); ++i)
int main() {
string s;
set<char> st;
rep(i, s.length()) {
st.insert(s[i]);
}
if ( st.size() = s.lengt... | a.cc: In function 'int main()':
a.cc:12:5: error: 'set' was not declared in this scope
12 | set<char> st;
| ^~~
a.cc:6:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
5 | #include<map>
+++ |+#include <set>
6 | using namespace std;
a.cc:12:... |
s460757385 | p03698 | C++ | /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
| |
s836947300 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
stirng S;
cin >> S;
string ans = "yes";
for (int i = 0; i < S.size() - 1; i++) {
for (int j = i + 1; j < S.size(); j++) {
if (S.at(i) == S.at(j)) ans = "no";
}
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:5:3: error: 'stirng' was not declared in this scope
5 | stirng S;
| ^~~~~~
a.cc:6:10: error: 'S' was not declared in this scope
6 | cin >> S;
| ^
|
s954318484 | p03698 | C++ | v#include <bits/stdc++.h>
using namespace std;
int main() {
stirng S;
cin >> S;
string ans = "yes";
for (int i = 0; i < S.size() - 1; i++) {
for (int j = i + 1; j < S.size(); j++) {
if (S.at(i) == S.at(j)) ans = "no";
}
}
cout << ans << endl;
}
| a.cc:1:2: error: stray '#' in program
1 | v#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'v' does not name a type
1 | v#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:5:3: error: 'stirng' was not declared in this scope
5 | stirng S;
| ^~~~~~
a.cc:6:3: error: 'cin' wa... |
s429799289 | p03698 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.next();
Set<String> visited = new HashSet<>();
for(char c : str.toCharArray()) {
if(visited.contains(c)) {
System.out.println("... | Main.java:12: error: incompatible types: char cannot be converted to String
visited.add(c);
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
|
s243425624 | p03698 | C++ | #include <iostream>
using namespace std;
int main()
{
int c,h;
set<char>se;
string s;
cin>>s;
for(int i=0;i<s.size();i++)
se.insert(s[i]);
if(s.size()==se.size())
cout<<"Yes";
else
cout<<"No";
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'set' was not declared in this scope
8 | set<char>se;
| ^~~
a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
1 | #include <iostream>
+++ |+#include <set>
2 |
a.cc:8:9: error: expecte... |
s160776542 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >>S;
sort(S.begin(),S.end());
int len=S.size();
for(int i=0;i+1<len;i++){
if(S.at(i)==S.at(i+1)){
cout<<"no";
return 0;
}
}
cout<<"yes";
return 0; | a.cc: In function 'int main()':
a.cc:16:14: error: expected '}' at end of input
16 | return 0;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s868407347 | p03698 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <vector>
#include <iomanip>
#define ALL(x) (x).begin(), (x).end()
#define sz(a) int(a.size())
#define rep(i,x,n) for(int i=x;i<n;i++)
#define repd(i,x,n... | a.cc: In function 'int main()':
a.cc:52:16: error: 'n' was not declared in this scope
52 | repd(i, 1, n)
| ^
a.cc:15:36: note: in definition of macro 'repd'
15 | #define repd(i,x,n) for(int i=x;i<=n;i++)
| ^
|
s834646585 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin>>N;
map<char,int> M;
for(int i=0; i<N.length(); i++){
if(!M.count(N.at(i))){M[N.at(i)]=1}
else{cout<<"no"<<endl;break;}
if(i==N.length()-1){cout<<"yes"<<endl;}}
}
| a.cc: In function 'int main()':
a.cc:11:39: error: expected ';' before '}' token
11 | if(!M.count(N.at(i))){M[N.at(i)]=1}
| ^
| ;
|
s007674830 | p03698 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
char[] c = sc.next().toCharArray();
boolean b = true;
Arrays.sort(c);
for(int i = 1;i<N;i++)
{
if(c[i]==c[i-1])
{
b = false;
break;
}
}
String ans;
... | Main.java:8: error: cannot find symbol
for(int i = 1;i<N;i++)
^
symbol: variable N
location: class Main
1 error
|
s477042411 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
string ans="YES";
for(int i=0;i<s.size();i++){
for(int j=i+1;j<s.size();j++){
if(s[i]==s[j]){
ans="NO"
}
}
}
cout<<ans<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:33: error: expected ';' before '}' token
11 | ans="NO"
| ^
| ;
12 | }
| ~
|
s766072659 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
string ans="YES"
for(int i=0;i<s.size();i++){
for(int j=i+1;j<s.size();j++){
if(s[i]==s[j]){
ans="NO"
}
}
}
cout<<ans<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'for'
8 | for(int i=0;i<s.size();i++){
| ^~~
a.cc:8:17: error: 'i' was not declared in this scope
8 | for(int i=0;i<s.size();i++){
| ^
|
s154938806 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll=long long;
void solve(){
string s;
cin>>s;
sort(s.begin(), s.end());
for(int i=1; i<s.size(); i++){
if(s[i]==s[i-1]){
cout<<"no"<<endl;
return;
}
}
cout<<"yes"<<endl;
}
signed main(){
//while(1)
solve();
| a.cc: In function 'int main()':
a.cc:21:17: error: expected '}' at end of input
21 | solve();
| ^
a.cc:19:14: note: to match this '{'
19 | signed main(){
| ^
|
s760645371 | p03698 | C++ | #include <bits/stdc++.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int my_abs(int num){
if (num > 0)
return num;
else
return -num;
}
int main(){
string S;
cin S;
string ans;
vector<char> SS(S.size());
for(int i = 0;i<S.size();... | a.cc: In function 'int main()':
a.cc:17:8: error: expected ';' before 'S'
17 | cin S;
| ^~
| ;
a.cc:25:29: error: 'i' was not declared in this scope
25 | if(SS.at(j) == S.at(i+1)){
| ^
|
s813936656 | p03698 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<n; ++i)
#define rep1(i, n) for (int i=1; i<=n; ++i)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
constexpr ll... | a.cc:33:16: error: stray '#' in program
33 | ll rtn = 1;#include <bits/stdc++.h>
| ^
a.cc: In function 'll factorial(ll, ll)':
a.cc:33:17: error: 'include' was not declared in this scope
33 | ll rtn = 1;#include <bits/stdc++.h>
| ^~~~~~~
a.cc:33:26: error: 'bits'... |
s549575425 | p03698 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
#include <queue>
#include <stack>
using namespace std;
typedef long long int ll;
typedef pair<int, int> Pii;
const ll mod = 1000000007;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string s;
cin >> s;
... | a.cc: In function 'int main()':
a.cc:24:25: 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... |
s800771626 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
for(int i = 0;i < S.size() - 1;++i){
for(int j = i + 1;j < S.size()){
if(!(S[i] == S[j])){
cout << "no" << endl;
return 0;
}
}
}
cout << "yes" << endl;
} | a.cc: In function 'int main()':
a.cc:9:35: error: expected ';' before ')' token
9 | for(int j = i + 1;j < S.size()){
| ^
| ;
|
s755036585 | p03698 | 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 ral... | a.cc: In function 'void solve()':
a.cc:117:17: error: no match for 'operator!=' (operand types are 'std::pair<const char, long long int>' and 'int')
117 | if (cnt != 1) {
| ~~~ ^~ ~
| | |
| | int
| std::pair<const char, long lon... |
s434260435 | p03698 | C++ | #include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <algorithm> // sort
#include <map> // 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;
int main(){
... | a.cc: In function 'int main()':
a.cc:32:17: error: 'res' was not declared in this scope
32 | res = "yes";
| ^~~
a.cc:36:17: error: 'res' was not declared in this scope
36 | res = "no";
| ^~~
a.cc:39:17: error: 'res' was not declared in th... |
s936765008 | p03698 | C++ | typedef long long ll;
const ll INF = 1LL << 40;
#define FOR(i,k,n) for(int i=(k);i<(n);++i)
#define all(x) ((x).begin(),(x).end())
int main(){
string s;cin >> s;
bool f = true;
FOR(i,0,s.size()){
FOR(j,0,s.size()){
if(i!=j && s[i]==s[j]){
f = false;
break... | a.cc: In function 'int main()':
a.cc:7:5: error: 'string' was not declared in this scope
7 | string s;cin >> s;
| ^~~~~~
a.cc:7:14: error: 'cin' was not declared in this scope
7 | string s;cin >> s;
| ^~~
a.cc:7:21: error: 's' was not declared in this scope
7 | strin... |
s097800897 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string text;
cin >> text;
bool flag=false;
int p=text.size()
for(int i=0;i<p;i++){
for(int j=i+1;j<p;j++){
char a=text.at(i);
char b=text.at(j);
if(a==b)flag=true;
}}
if(flag)cout << "no" <<endl;
else cout << "yes" <<endl;
} | a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | for(int i=0;i<p;i++){
| ^~~
a.cc:8:15: error: 'i' was not declared in this scope
8 | for(int i=0;i<p;i++){
| ^
|
s145820458 | p03698 | 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:77:16: error: macro "rep" requires 2 arguments, but only 1 given
77 | rep(auto c: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:77:3: error: 'rep' was not declared in this sc... |
s972594818 | p03698 | C++ | #include <iostream>
using namespace std;
int main()
{
string s;
bitset<30> f;
f.reset();
cin >> s;
bool ans=true;
for(int i=0; i<s.size(); ++i)
{
int id = s[i]-'a';
if (f[id]) ans=ans&(false);
else
{
f[id]=1;
ans=ans&(true);
}
}
if (ans) cout << "yes"; else cout << "... | a.cc: In function 'int main()':
a.cc:8:3: error: 'bitset' was not declared in this scope
8 | bitset<30> f;
| ^~~~~~
a.cc:2:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
1 | #include <iostream>
+++ |+#include <bitset>
2 |
a.cc:8:14... |
s160484167 | p03698 | C++ | #include<iostream>
#include<string>
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
typedef long long ll;
int main(){
string S;
cin >> S;
int len = S.length();
bool ans =true;
for(int i=; i<N-1; i++){
for(int j=i+1; j<N; j++){
if(S[i]==S[j]){
ans =... | a.cc: In function 'int main()':
a.cc:12:15: error: expected primary-expression before ';' token
12 | for(int i=; i<N-1; i++){
| ^
a.cc:12:19: error: 'N' was not declared in this scope
12 | for(int i=; i<N-1; i++){
| ^
|
s721033016 | p03698 | C++ | #include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
using namespace std;
signed main(){
string a;
cin>>a;
int b=0;
rep(i,a.size()){
rep(i,a.s... | a.cc: In function 'int main()':
a.cc:15:22: error: 'j' was not declared in this scope
15 | if(a.at(i)==a.at(j))
| ^
|
s305807436 | p03698 | C++ | // https://atcoder.jp/contests/abc063/tasks/abc063_b
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define REP(i, n) FOR(i, 0, n)
#define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
#define ALLR(obj) (obj).... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:2:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_... |
s333627581 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
vector<int> c(26, 0);
for(int i=0; i<n; i++){
c.at((int)(s.at(i)-'a')) += 1;
}
int c_max = 0;
for(int i: c){
c_max = max(c_max, i);
}
if(c_max > 1) cout << "no" << endl;
else cout << "yes" << endl;
ret... | a.cc: In function 'int main()':
a.cc:9:18: error: 'n' was not declared in this scope
9 | for(int i=0; i<n; i++){
| ^
|
s033180654 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
vector<int> c(26, 0);
for(int i=0; i<n; i++){
c.at((int)(s.at(i)-'a')) += 1;
}
int c_max = 0;
for(int i: c){
c_max = max(c_max, c);
}
if(c_max > 1) cout << "no" << endl;
else cout << "yes" << endl;
ret... | a.cc: In function 'int main()':
a.cc:9:18: error: 'n' was not declared in this scope
9 | for(int i=0; i<n; i++){
| ^
a.cc:15:16: error: no matching function for call to 'max(int&, std::vector<int>&)'
15 | c_max = max(c_max, c);
| ~~~^~~~~~~~~~
In file included from ... |
s133542192 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
a=s.size();
for(int i=0;i<a;i++){
for(int j=0;j<a;j++){
if(s[i]==s[j] && i!=j){
cout<<"no"<<endl;
return 0;
}
}
}
cout<<"yes"<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:3: error: 'a' was not declared in this scope
6 | a=s.size();
| ^
|
s709110118 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
int count = 0;
sort(N.begin(),N.end());
for(int i = 0; i < N.size()-1; i++){
if(N.at(i) == N.at(i+1)){
count++;
}
}
if(count > 0){
cout << "no" << endl;
}
else cout << "yes"
} | a.cc: In function 'int main()':
a.cc:17:22: error: expected ';' before '}' token
17 | else cout << "yes"
| ^
| ;
18 |
19 | }
| ~
|
s841935905 | p03698 | Java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s = sc.next();
ArraysList<String> a = new ArraysList<String>;
for(int i = 0; i < s.length(); i++){
a.add(s.charAt(i));
}
Arrays.sort();
int flag = 0;
for(int i = 0... | Main.java:7: error: '(' or '[' expected
ArraysList<String> a = new ArraysList<String>;
^
Main.java:14: error: illegal start of expression
if()
^
Main.java:15: error: reached end of file while parsing
^
3 errors
|
s736027134 | p03698 | Java | import java.util.*;public class Main{public static void main(String[]a){Scanner sc=new Scanner(System.in);int s=sc.next().length();Set<Character>t=new HashSet<>();for(int i=0;i<s;i++){t.add(S.charAt(i));}System.out.println(t.size()==s?"yes":"no");}} | Main.java:1: error: cannot find symbol
import java.util.*;public class Main{public static void main(String[]a){Scanner sc=new Scanner(System.in);int s=sc.next().length();Set<Character>t=new HashSet<>();for(int i=0;i<s;i++){t.add(S.charAt(i));}System.out.println(t.size()==s?"yes":"no");}}
... |
s433759668 | p03698 | C++ | #include<stdio.h>
#include<string.h>
int main(void)
{
char s[26];
int i,j,flg;
scanf("%s",s);
n=strlen;
for(i=0;i<n;i++){
for(j=i+1;j=n;j++){
if(s[i]==s[j])}
flg==1;
}
}
}
if(flg==1){
printf("Yes\n");
}
else{
printf("No\n");
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:9: error: 'n' was not declared in this scope
8 | n=strlen;
| ^
a.cc:11:39: error: expected primary-expression before '}' token
11 | if(s[i]==s[j])}
| ^
a.cc: At global scope:
a.cc:15:9... |
s408284260 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define SZ(x) ((int)(x).size())
#define debug(x) cerr << #x << ": " << x << '\n'
#define INF 999999999
typedef long long int Int;
typedef pair<int,int> P;
using ll... | a.cc: In function 'int main()':
a.cc:18:5: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'erace'; did you mean 'erase'?
18 | t.erace(unique(t.begin(),t.end()),t.end());
| ^~~~~
| erase
a.cc:19:19: error: no match for 'operator==' (operand types are 'std... |
s866779431 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define SZ(x) ((int)(x).size())
#define debug(x) cerr << #x << ": " << x << '\n'
#define INF 999999999
typedef long long int Int;
typedef pair<int,int> P;
using ll... | a.cc: In function 'int main()':
a.cc:18:5: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'erace'; did you mean 'erase'?
18 | t.erace(unique(t.begin(),t.end(),t.end()));
| ^~~~~
| erase
a.cc:19:19: error: no match for 'operator==' (operand types are 'std... |
s153848315 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s;
set<string> t;
cin>>s;
for (char c:s)
t.insert(c);
if (s.size()==t.size())
puts("yes");
else
puts("no");
return 0;
} | a.cc: In function 'int main()':
a.cc:10:17: error: no matching function for call to 'std::set<std::__cxx11::basic_string<char> >::insert(char&)'
10 | t.insert(c);
| ~~~~~~~~^~~
In file included from /usr/include/c++/14/set:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc... |
s170539404 | p03698 | Java | import java.util.Scanner;
public class Main {
public static void Main {
Scanner sc = new Scanner(System.in);
String s = sc.next();
int[] charCnt = new int[26];
for (char c: s.toCharArray()) {
if (charCnt[c - 'a'] != 0) {
System.out.println("no");
... | Main.java:4: error: '(' expected
public static void Main {
^
1 error
|
s264844170 | p03698 | C++ | /*
∧_∧ やあ
(´・ω・`) / ようこそ、バーボンハウスへ。
/∇y:::::\ [ ̄] このテキーラはサービスだから、まず飲んで落ち着いて欲しい。
|:⊃:|:::::| |──|
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄| うん、「また」なんだ。済まない。
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄| ̄ 仏の顔もって言うしね、謝って許してもらおうとも思っていない。
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄/|
∇ ∇ ∇ ∇ /./| でも、この提出を見たとき、君は、きっと言葉では言い表せない
┴ ┴ ┴ ┴ / / | 「ときめき」みたいなものを感じて... | a.cc: In function 'int main()':
a.cc:122:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
122 | cout << ans << endl;
| ^~~
| abs
|
s187325190 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
sort(s.begin(), s.end());
bool flag = false;
if(i = 0; i < s.size() - 1; i++){
if(s[i] == s[i+1])flag = true;
}
if(flag)cout << "no" << endl;
else cout << "yes" << endl;
} | a.cc: In function 'int main()':
a.cc:8:12: error: 'i' was not declared in this scope
8 | if(i = 0; i < s.size() - 1; i++){
| ^
a.cc:8:35: error: expected ')' before ';' token
8 | if(i = 0; i < s.size() - 1; i++){
| ~ ^
| ... |
s874008499 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
bool ans = true;
for(int i = 0; i < S.size(); i++){
for(int j = 0; j < S.size(); J++){
if(S[i] == S[j]){
ans = false;
}else{
ans = true;
}
}
}
if(ans){
... | a.cc: In function 'int main()':
a.cc:9:38: error: 'J' was not declared in this scope
9 | for(int j = 0; j < S.size(); J++){
| ^
|
s929777622 | p03698 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s = sc.next();
char[] array = s.toCharArray();
Arrays.sort(array);
int count = 0;
for(int i = 1;i < s.length();i++){
if(arrray[i]==array[i-1])count++;
... | Main.java:10: error: cannot find symbol
if(arrray[i]==array[i-1])count++;
^
symbol: variable arrray
location: class Main
1 error
|
s706088520 | p03698 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s = sc.next();
char[] array = s.toCharArray();
Arrays.sort(array);
int count = 0;
for(int i = 1;i < n;i++){
if(arrray[i]==array[i-1])count++;
}
... | Main.java:9: error: cannot find symbol
for(int i = 1;i < n;i++){
^
symbol: variable n
location: class Main
Main.java:10: error: cannot find symbol
if(arrray[i]==array[i-1])count++;
^
symbol: variable arrray
location: class Main
Main.java:12: error: incompatible... |
s146833496 | p03698 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s = sc.next();
char[] array = s.toCharArray();
Arrays.sort(array);
int count = 0;
for(int i = 1;i < n;i++){
if(arrray[i]==array[i-1])count++;
}
... | Main.java:13: error: ';' expected
else System.out.println("no")
^
1 error
|
s513135488 | p03698 | C++ | #include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <cassert>
#include <functional>
#include <string>
#include <sstream>
#include <cctype>
using namespace std;
int main(){
string S; cin >> S;
vecto<int> cnt(26, 0);
for(int i = 0; i < S.size()... | a.cc: In function 'int main()':
a.cc:17:3: error: 'vecto' was not declared in this scope
17 | vecto<int> cnt(26, 0);
| ^~~~~
a.cc:17:9: error: expected primary-expression before 'int'
17 | vecto<int> cnt(26, 0);
| ^~~
a.cc:20:8: error: 'cnt' was not declared in this scope; did you mean '... |
s287910859 | p03698 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
cin >> n;
for(int i=0;i<s.size();i++){
for(int j=i+1;j<s.size();j++){
if(s[i] == s[j]){
cout << "no" << endl;
return 0;
}
}
}
cout << "yes" << endl;... | a.cc: In function 'int main()':
a.cc:7:12: error: 'n' was not declared in this scope
7 | cin >> n;
| ^
|
s761040206 | p03698 | C++ | #include <iostream>
using namespace std;
int main(){
string s;
char t;
cin>>s;
for(int i=0;i<s.length(),i++){
t=s[i];
for(int k=i+1;k<s.length(),k++){
if(t==s[k]){cout<<"no"<<endl; return 0;}
}
}
cout<<"yes"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:31: error: expected ';' before ')' token
8 | for(int i=0;i<s.length(),i++){
| ^
| ;
a.cc:10:35: error: expected ';' before ')' token
10 | for(int k=i+1;k<s.length(),k++){
| ... |
s437445658 | p03698 | C++ | #include <iostream>
using namespace std;
int main(){
string s;
char t;
cin>>s;
for(int i=0;i<s.length(),i++){
t=s[i];
for(int k=i+1;k<s.length(),k++){
if(t==s[k]){cout<<"no"<<endl; return 0;}
}
}
cout<<"yes"<<endl;
retturn 0;
} | a.cc: In function 'int main()':
a.cc:8:31: error: expected ';' before ')' token
8 | for(int i=0;i<s.length(),i++){
| ^
| ;
a.cc:10:35: error: expected ';' before ')' token
10 | for(int k=i+1;k<s.length(),k++){
| ... |
s321295923 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
string s;
cin>>s;
vecto... | a.cc: In function 'int main()':
a.cc:23:16: error: 'cnt' was not declared in this scope; did you mean 'int'?
23 | if(a[i]==1)cnt++;
| ^~~
| int
a.cc:25:6: error: 'cnt' was not declared in this scope; did you mean 'int'?
25 | if(cnt==s.size())cout<<"yes"<<endl;
... |
s572912718 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
string s;
cin>>s;
vecto... | a.cc: In function 'int main()':
a.cc:17:9: error: 'n' was not declared in this scope
17 | rep(i,n){
| ^
a.cc:4:38: note: in definition of macro 'rep'
4 | #define rep(i,n) for(int i=0;i<(int)(n);i++)
| ^
|
s990306271 | p03698 | Java |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);)
String s = sc.next();
String ans = "yes";
for (int i = 0; i < s.length(); i++) {
for (int j = 0; j < s.length(); j++) {
if (s.charAt(i) == s.charAt(j)) {
ans = "n... | Main.java:6: error: illegal start of expression
Scanner sc = new Scanner(System.in);)
^
1 error
|
s261813161 | p03698 | C++ | #include<algorithm>
#include<iostream>
#include<iomanip>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<queue>
using namespace std;
char ch[10005];
int vst[10005];
int main()
{
scanf("%s",ch+1);
len=strlen(ch+1);
for(int i=1;i<=len;i++)
{
if(vst[ch[i]]){printf("no\n");return 0;}
else vst[ch[i]]++;
... | a.cc: In function 'int main()':
a.cc:14:9: error: 'len' was not declared in this scope
14 | len=strlen(ch+1);
| ^~~
|
s018931037 | p03698 | C++ | #include<iostream>
#include<string>
using namespace std;int main()
{
int a[26] = { 0 },flag1=0,flag=0,i=0;
string s;
cin >> s;
for ( int f;i < s.length(); i++)
{
s[i] = a[i];
}
for (int b = 0; b < i ; b++)
{
for (int c = 0; c < i ; c++)
{
if (a[b] == a[c])
{
flag1=flag1+1;
}
}
}
if (flag... | a.cc: In function 'int main()':
a.cc:31:9: error: unable to find numeric literal operator 'operator""\U0000ff1b'
31 | return 0;
| ^~~
a.cc:31:12: error: expected ';' before '}' token
31 | return 0;
| ^
| ;
32 | }
| ~
|
s847957547 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
char jubge = z;
bool a = true;
cin >> s;
sort(s.begin(),s.end());
for(int i = 0; i < s.size(); i++){
if(z == s.at(i)){
a = false;
break;
}else{
jubge = s.at(i);
}
}
if(a)
cout << "yes" << endl;
else... | a.cc: In function 'int main()':
a.cc:6:16: error: 'z' was not declared in this scope
6 | char jubge = z;
| ^
|
s050301375 | p03698 | C | #include <stdio.h>
int main(void) {
int k[26];
int x[26];
while(fgets(k,26,scanf) != NULL) {
fgets(k,26,scanf);
int i = 0;
while (k[i] - 'a' >= 0 k[i] - 'a') {
x[k[i] - 'a']++;
}
int z = 0;
for (int j = 0; j < 26; ++j) {
if (x[j] > 1) {z = 1;}
}
if (z == 0) {printf("yes\n");... | main.c: In function 'main':
main.c:5:15: error: passing argument 1 of 'fgets' from incompatible pointer type [-Wincompatible-pointer-types]
5 | while(fgets(k,26,scanf) != NULL) {
| ^
| |
| int *
In file included from main.c:1:
/usr/include/stdio.h:654:38... |
s252481597 | p03698 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#define ll long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) FFOR(i,0,n)
#define SORT(V) sor... | a.cc: In function 'int main()':
a.cc:22:9: error: 'N' was not declared in this scope
22 | REP(i,N-1){
| ^
a.cc:9:37: note: in definition of macro 'FOR'
9 | #define FOR(i,a,b) for(int i=(a);i<(b);++i)
| ^
a.cc:22:3: note: in expansion of macro 'REP'
22 ... |
s899480218 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i,n) for(int i=0;i<n;++i)
#define MOD 1000000007
int main(){
string S;
cin >> S;
sort(S, S+S.size());
rep(i, S.size()-1){
if(S[i]==S[i+1]){
printf("no\n");
return 0;... | a.cc: In function 'int main()':
a.cc:11:14: error: no match for 'operator+' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
11 | sort(S, S+S.size());
| ~^~~~~~~~~
| | |... |
s102347644 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main{
int a=0;string s;cin>>s;
vector<char> t(s.size());
for(int i=0;i<s.size();i++)t.at(i)=s.at(i);
sort(t.begin(),t.end());
for(int j=0;j<s.size()-1;j++){
if(t.at(j)==t.at(j+1)){
a++;
break;
}
}
if(a>0)cout<<"no"<<endl;
else cout<<"y... | a.cc:3:5: error: cannot declare '::main' to be a global variable
3 | int main{
| ^~~~
a.cc:4:3: error: expected primary-expression before 'int'
4 | int a=0;string s;cin>>s;
| ^~~
a.cc:4:3: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
3 | int main{
| ^
... |
s565666997 | p03698 | C++ | #include <iostream>
using namespace std;
int main(){
string S;
//Sを定義
string ans = "yes";
//出力用の文字列変数ansを定義
cin >> S;
//標準入力
for(string i = 0 - 1; i < S.length(); i++){
for(int j = i + 1; j < S.length(); j++){
if(S[i] == S[j]){
ans = "no";
}
... | a.cc: In function 'int main()':
a.cc:12:22: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
12 | for(string i = 0 - 1; i < S.length(); i++){
| ~~^~~
a.cc:12:29: error: no match for 'operator<' (operand types are 'std::strin... |
s116639580 | p03698 | C++ | #include <iostream>
using namespace std;
int main(){
string S;
//Sを定義
string ans;
//出力用の文字列変数ansを定義
cin >> S;
//標準入力
string ans = "yes";
for(string i = 0 - 1; i < S.length(); i++){
for(int j = 1 + 1; j < S.length(); j++){
if(S[i] == S[j]){
ans = "no";
... | a.cc: In function 'int main()':
a.cc:12:12: error: redeclaration of 'std::string ans'
12 | string ans = "yes";
| ^~~
a.cc:8:12: note: 'std::string ans' previously declared here
8 | string ans;
| ^~~
a.cc:13:22: error: conversion from 'int' to non-scalar type 'std::string... |
s666221439 | p03698 | C++ | #include <iostream>
using namespace std;
int main(){
string S;
//Sを定義
string ans;
//出力用の文字列変数ansを定義
cin >> S;
//標準入力
string ans = "yes";
for(int i = 0 - 1; i < S.length(); i++){
for(int j = 1 + 1; j < S.length(); j++){
if(S[i] == S[j]){
cout << "no" << e... | a.cc: In function 'int main()':
a.cc:12:12: error: redeclaration of 'std::string ans'
12 | string ans = "yes";
| ^~~
a.cc:8:12: note: 'std::string ans' previously declared here
8 | string ans;
| ^~~
|
s292529370 | p03698 | C++ | #include <iostream>
using namespace std;
int main(){
string S;
//Sを定義
string ans;
//出力用の文字列変数ansを定義
cin >> S;
//標準入力
string ans = "yes"
for(int i = 0 - 1; i < S.length(); i++){
for(int j = 1 + 1; j < S.length(); j++){
if(S[i] == S[j]){
cout << "no" << en... | a.cc: In function 'int main()':
a.cc:12:12: error: redeclaration of 'std::string ans'
12 | string ans = "yes"
| ^~~
a.cc:8:12: note: 'std::string ans' previously declared here
8 | string ans;
| ^~~
a.cc:13:24: error: 'i' was not declared in this scope
13 | for(int... |
s697176277 | p03698 | C++ | #include <iostream>
using namespace std;
int main(){
string S;
//Sを定義
string ans;
//出力用の文字列変数ansを定義
cin >> S;
//標準入力
string ans = "yes"
for(int i = 0 + 1; i < S.length(); i++){
for(int j = 1 - 1; j < S.length(); j++){
if(S[i] == S[j]){
cout << "no" << en... | a.cc: In function 'int main()':
a.cc:12:12: error: redeclaration of 'std::string ans'
12 | string ans = "yes"
| ^~~
a.cc:8:12: note: 'std::string ans' previously declared here
8 | string ans;
| ^~~
a.cc:13:24: error: 'i' was not declared in this scope
13 | for(int... |
s067471283 | p03698 | C++ | #include <iostream>
using namespace std;
int main(){
string S;
//Sを定義
string ans;
//出力用の文字列変数ansを定義
cin >> S;
//標準入力
for(int i = 1+1; i < S.length(); i++){
for(int j = 1-1; j < S.length(); j++){
if(S[i] == S[j]){
cout << "no" << endl;
}
... | a.cc: In function 'int main()':
a.cc:20:2: error: expected '}' at end of input
20 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s671050671 | p03698 | C++ | #include <iostream>
using namespace std;
int main(){
string S;
//Sを定義
string ans;
//出力用の文字列変数ansを定義
cin >> S;
//標準入力
for(int i = 1+1; i < S.length(); i++){
for(int j = 1-1; j < S.length(); j++)
if(S[i] == [j]){
cout << "no" << endl;
}
c... | a.cc: In lambda function:
a.cc:14:23: error: expected '{' before ')' token
14 | if(S[i] == [j]){
| ^
a.cc: In function 'int main()':
a.cc:14:17: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and... |
s900308810 | p03698 | C++ | #include <iostream>
using namespace std;
int main(){
string S;
//Sを定義
string ans;
//出力用の文字列変数ansを定義
cin >> S;
//標準入力
for(int i = 1+1; i < S.length(); i++){
for(int j = 1-1; j < S.length(); j++)
if(S[i] == [j]){
cout << "no" << endl;
} else {
... | a.cc: In lambda function:
a.cc:14:23: error: expected '{' before ')' token
14 | if(S[i] == [j]){
| ^
a.cc: In function 'int main()':
a.cc:14:17: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and... |
s826410115 | p03698 | C++ | #include <iostream>
using namespace std;
int main(){
string S;
//Sを定義
string ans;
//出力用の文字列変数ansを定義
cin >> S;
//標準入力
for(int i = 1; i < S.length()+1; i++){
for(int j = 1; j < S.length()-1; j++)
if(S[i] == [j]){
cout << "no" << endl;
} else {
... | a.cc: In lambda function:
a.cc:14:23: error: expected '{' before ')' token
14 | if(S[i] == [j]){
| ^
a.cc: In function 'int main()':
a.cc:14:17: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and... |
s674192509 | p03698 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin>> s;
int a=0
for(int i=0;i<s.sizs();i++){
for(int j=0;j<i;j++){
if(s.at(i)==s.at(j)){
a=1
}
}
}
if(a==0){
cout<<"yes"<<endl;
}
else{
cout<<"no"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: expected ',' or ';' before 'for'
9 | for(int i=0;i<s.sizs();i++){
| ^~~
a.cc:9:21: error: 'i' was not declared in this scope
9 | for(int i=0;i<s.sizs();i++){
| ^
a.cc:9:25: error: 'std::string' {aka 'class s... |
s406940155 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s; cin>>s;
string ans="yes";
for(int i=1;i<s;i++){
for(int j=0;j<i;j++){
if(s[i]==s[j]){
ans="no";
}
}
}
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:6:16: error: no match for 'operator<' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
6 | for(int i=1;i<s;i++){
| ~^~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
... |
s550688646 | p03698 | C++ | #include <iostream>
#include <vector>
#include <string>
int main(){
string s;
cin >> s;
int cnt[26] = {0};
for(int i = 0; i < s.size(); i++){
cnt[s[i] - 'a'] ++;
}
for(int i = 0; i < 26; i++){
if(cnt[i] >= 2){
std::cout << "no" << std::endl;
return 0;
... | a.cc: In function 'int main()':
a.cc:7:5: error: 'string' was not declared in this scope
7 | string s;
| ^~~~~~
a.cc:7:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostre... |
s991361155 | p03698 | C++ | #include<iostream>
using namespace std;
int main() {
strig S;
cin >> S;
bool A = true;
for(int i = 0;i < 26;i++) {
int count = 0;
for(int j = 0;j < S.size();j++) {
if(S.at(j) == 'a' + i) {
count++;
}
}
if(count > 1) {
A = false;
break;
}
}
if(A == true) {... | a.cc: In function 'int main()':
a.cc:5:3: error: 'strig' was not declared in this scope
5 | strig S;
| ^~~~~
a.cc:6:10: error: 'S' was not declared in this scope
6 | cin >> S;
| ^
|
s899577168 | p03698 | C++ | #include<iostream>
using namespace std;
int main(){
char s[30];
int a[200]={};
cin>>s;
bool flg=false;
for(int i=0;i<strlen(s);i++){
if(a[s[i]]==1){
flg=true;
}
a[s[i]]=1;
}
if(flg){
cout<<"no\n";
}else{
cout<<"yes\n";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:17: error: 'strlen' was not declared in this scope
9 | for(int i=0;i<strlen(s);i++){
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include ... |
s364801266 | p03698 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
const int INF = 1e9;
const int MOD = 1e9+7;
const longlong LINF = 1e18;
int main(){
string S;
cin >> S;
bool ok = true;
for(int i = 0; i < S.size()-1; i++){
for(int j = i+1; j < S.size(); j++){
if(S[i] == ... | a.cc:9:7: error: 'longlong' does not name a type
9 | const longlong LINF = 1e18;
| ^~~~~~~~
|
s827773751 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i=0; i<n;i++)
#define REPR(i, n) for(int i=n-1 ; i>=0; i--)
#define FOR(i, m, n) for(int i=m; i<n; i++)
#define INF 2e9
#define ll long long
int main(){
string s;
cin>>s;
int a[26];
REP(i, 26){
a[i] = 0
}
for(auto... | a.cc: In function 'int main()':
a.cc:16:17: error: expected ';' before '}' token
16 | a[i] = 0
| ^
| ;
17 | }
| ~
|
s766713856 | p03698 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main () {
string S; cin >> S;
bool can = true;
sort(S.begin(), S.end());
rep(i, N-1) {
if (S[i] == S[i+1]) can = false;
}
if (can) cout << "yes" << endl;
else cout << "no" << endl;
} | a.cc: In function 'int main()':
a.cc:10:12: error: 'N' was not declared in this scope
10 | rep(i, N-1) {
| ^
a.cc:2:40: note: in definition of macro 'rep'
2 | #define rep(i, n) for (int i = 0; i < (n); i++)
| ^
|
s054341084 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
vector<int> num(26);
for (int i=0; i<s.size; i++) {
num[S[i] - 'a']++;
}
for (int i=0; i<26; i++) {
if (num[i] > 1) {
cout << "no" << endl;
return 0;
}
}
cout << "yes" << endl;
} | a.cc: In function 'int main()':
a.cc:8:21: 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 unsign... |
s776499958 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
set<char> T;
for(auto& s : S){
T.insert(s)
}
cout << (S.size() == T.size() ? "yes" : "no") << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:16: error: expected ';' before '}' token
10 | T.insert(s)
| ^
| ;
11 | }
| ~
|
s666557353 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int S;
cin >> S;
set<char> T;
for(auto& s : S){
T.insert(s)
}
cout << (S.size() == T.size() ? "yes" : "no") << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:17: error: 'begin' was not declared in this scope
9 | for(auto& s : S){
| ^
a.cc:9:17: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/valarray... |
s869489581 | p03698 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define repb(i, n) for (int i = (int)n; i >= 0; i--)
#define reps(i, m, n) for (int i = (int)m; i < (int)n; i++)
#define repsb(i, m, n) for (int i = (int)m; i >= (int)n; i--)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v... | a.cc: In function 'int main(int, const char**)':
a.cc:6:30: error: no match for 'operator+' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
6 | #define SORT(v, n) sort(v, v + n);
| ... |
s715585014 | p03698 | Java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
String s=sc.next();
char[] chars=new char[s.length()];
for(int i=0;i<s.length();i++){
chars[i]=s.charAt(i);
}
Arrays.sort(chars);
for(int i=0;i<s.length()-1;i++){
if(chars... | Main.java:13: error: ';' expected
System.out.println("no")
^
1 error
|
s882535532 | p03698 | Java | import java.util.*;
class Main{
public static main(String[] args){
Scanner sc=new Scanner(System.in);
String s=sc.next();
char[] chars=new char[s.length()];
for(int i=0;i<s.length()i++){
chars[i]=s.charAt(i);
}
Arrays.sort(chars);
for(int i=0;i<s.length()-1;i++){
if(chars[i]==c... | Main.java:3: error: invalid method declaration; return type required
public static main(String[] args){
^
Main.java:7: error: ';' expected
for(int i=0;i<s.length()i++){
^
2 errors
|
s343300813 | p03698 | Java | import java.util.*;
class Main{
public static main(String[] args){
Scanner sc=new Scanner(System.in);
String s=sc.next();
char[] chars=new char[s.length()];
for(int i=0;i<s.length()i++){
chars[i]=s.charAt(i);
}
Arrays.sort(chars);
for(int i=0;i<s.length()-1;i++){
if(chars[i]==c... | Main.java:3: error: invalid method declaration; return type required
public static main(String[] args){
^
Main.java:7: error: ';' expected
for(int i=0;i<s.length()i++){
^
Main.java:13: error: ';' expected
System.out.println("no")
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.