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)
count = 1;
}
if(count==0)
cout<< "yes"<<endl;
else
cout<< "no"<<endl;
}
return 0;
}
| 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::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
from a.cc:1:
/usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
|
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;
}
}
printf("no");
return 0;
} | 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";
break;
}
}
}
cout << ans << endl;
}
| 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, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
13 | ans == "no";
| ~~~~^~~~~~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
|
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, make_vec<T>(ts...));
}
template <class T>
bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
using ll = long long;
using ull = unsigned long long;
const int INF = 1e9;
// const int MOD = 1e9 + 7;
int get(int n) {
if (n == 2) {
return 0;
} else if (n == 4 || n == 6 || n == 9 || n == 11) {
return 1;
} else {
return 2;
}
}
int main() {
string S;
cin >> S;
set<char> s;
for (auto c : S) {
if (s.cout(c)) {
cout << "no\n";
return 0;
} else {
s.insert(c);
}
}
cout << "yes\n";
}
| 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.end());
typedef long long ll;
int maim(){
string s;
cin >> s;
map<char,int> mp;
for(char c : s) mp[c]++;
if(mp.size() == s.size()) cout << "yes" << endl;
cout << "no" << endl;
} | 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 exit status
|
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 = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);
//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
// ll a, b;
// cin >> a >> b;
// work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)
int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };
//最大公約数
ll gcd(ll x, ll y) {
return y ? gcd(y, x % y) : x;
}
ll lcm(ll x, ll y) {
if (x == 0 || y == 0)return 0;
return (x / gcd(x, y) * y);
}
//素因数分解
vector<pair<ll, int>>factorize(ll n) {
vector<pair<ll, int>>res;
for (ll i = 2;i * i <= n;++i) {
if (n % i)continue;
res.emplace_back(i, 0);
while (n % i == 0) {
n /= i;
res.back().second++;
}
}
if (n != 1)res.emplace_back(n, 1);
return res;
}
int bingo[3][3];
bool flag[3][3];
int cnt[2][105];
int h, w;
int choco[1010][1010];
int s[11][11];
int main() {
string s;
cin >> s;
int n = s.length();
bool flag = true;
vector<int>a(30);
rep(i, n) {
char x = s[i];
int target = x - '0';
a[target]++;
}
rep(i, 30) {
if (a[i] >= 2)flag = false;
}
if (flag)puts("Yes");
else puts("No")
return 0;
}
| 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 = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);
//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
// ll a, b;
// cin >> a >> b;
// work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)
int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };
//最大公約数
ll gcd(ll x, ll y) {
return y ? gcd(y, x % y) : x;
}
ll lcm(ll x, ll y) {
if (x == 0 || y == 0)return 0;
return (x / gcd(x, y) * y);
}
//素因数分解
vector<pair<ll, int>>factorize(ll n) {
vector<pair<ll, int>>res;
for (ll i = 2;i * i <= n;++i) {
if (n % i)continue;
res.emplace_back(i, 0);
while (n % i == 0) {
n /= i;
res.back().second++;
}
}
if (n != 1)res.emplace_back(n, 1);
return res;
}
int bingo[3][3];
bool flag[3][3];
int cnt[2][105];
int h, w;
int choco[1010][1010];
int s[11][11];
int main() {
string s;
cin >> s;
int n = s.length();
bool flag = true;
vector<int>a(30);
rep(i, n) {
string str = s[i];
char x = str.c_str();
int target = x - '0';
a[target]++;
}
rep(i, 30) {
if (a[i] >= 2)flag = false;
}
if (flag)puts("Yes");
else puts("No");
return 0;
}
| 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.cc:68:35: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
68 | char x = str.c_str();
| ~~~~~~~~~^~
| |
| const char*
|
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++){
if(c[i].equals(c[i+1])){
System.out.println("No");
return;
}
}
System.out.println("Yes");
}
} | 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 unsigned int]' (did you forget the '()' ?)
8 | for(int i=0; i+1<str.size; i++){
| ~~~~^~~~
| ()
|
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(){
string s; cin >> s;
vector<int> j(26,0);
rep(i,s.size){
j[s[i] - '0']++;
}
bool jud = true;
rep(i,26) if(j[i] >= 2) jud = false;
if(jud) cout << "yes" << endl;
else cout << "no" << endl;
} | 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 unsigned int]' (did you forget the '()' ?)
16 | rep(i,s.size){
| ^
a.cc:2:32: note: in definition of macro 'rep'
2 | #define rep(i,n) for(ll i=0;i<(n);++i)
| ^
|
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;
}
}
if(flag){
break;
}
}
if(flag){
cout << "no" << endl;
}else{
cout << "yes" << endl;
}
}
| 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){
| ^
a.cc:3:30: note: in definition of macro 'rep'
3 | #define rep(i,n) for(int i=0;i<(int)(n);i++)
| ^
|
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;
return 0;
} | 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 | al[S[i] - 97]++;
| ^~
a.cc:12:9: error: 'al' was not declared in this scope
12 | if (al[i] >= 2) ans = false;
| ^~
|
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>
#include <unordered_map>
#include <queue>
#include <regex>
#include <functional>
#include <complex>
#include <list>
#include <cassert>
#include <iomanip>
#include <set>
#include <stack>
/*多倍長整数/cpp_intで宣言
#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
*/
#pragma gcc target ("avx2")
#pragma gcc optimization ("o3")
#pragma gcc optimization ("unroll-loops")
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define rep1(i, n) for(int i = 1; i <= (n); ++i)
#define rep2(i, n) for(int i = 2; i < (n); ++i)
#define repr(i, n) for(int i = n; i >= 0; --i)
#define reprm(i, n) for(int i = n - 1; i >= 0; --i)
#define printynl(a) printf(a ? "yes\n" : "no\n")
#define printyn(a) printf(a ? "Yes\n" : "No\n")
#define printYN(a) printf(a ? "YES\n" : "NO\n")
#define printim(a) printf(a ? "possible\n" : "imposible\n")
#define printdb(a) printf("%.50lf\n", a) //少数出力
#define printdbd(a) printf("%.16lf\n", a) //少数出力(桁少なめ)
#define prints(s) printf("%s\n", s.c_str()) //string出力
#define all(x) (x).begin(), (x).end()
#define allsum(a, b, c) ((a + b) * c / 2.0) //等差数列の和、初項,末項,項数
#define pb push_back
#define priq priority_queue
#define rpriq priq<int, vector<int>, greater<int>>
#define deg_to_rad(deg) (((deg)/360.0)*2.0*PI)
#define rad_to_deg(rad) (((rad)/2.0/PI)*360.0)
#define Please return
#define AC 0
#define addf(T) [](T a, T b){return (a + b);}
#define minf(T) [](T a, T b){return min(a, b);}
#define maxf(T) [](T a, T b){return max(a, b);}
#define nopf(T) [](T a){return a;}
#define manhattan_dist(a, b, c, d) (abs(a - c) + abs(b - d)) /*(a, b) から (c, d) のマンハッタン距離 */
using ll = long long;
constexpr int INF = 1073741823;
constexpr int MINF = -1073741823;
constexpr ll LINF = ll(4661686018427387903);
constexpr ll MOD = 1000000007;
const long double PI = acos(-1.0L);
using namespace std;
void scans(string& str) {
char c;
str = "";
scanf("%c", &c);
if (c == '\n')scanf("%c", &c);
while (c != '\n' && c != -1 && c != ' ') {
str += c;
scanf("%c", &c);
}
}
void scanc(char& str) {
char c;
scanf("%c", &c);
if (c == -1)return;
while (c == '\n') {
scanf("%c", &c);
}
str = c;
}
double acot(double x) {
return PI / 2 - atan(x);
}
ll gcd(ll a, ll b) {
if (b == 0) return a;
return gcd(b, a % b);
}
ll lcm(ll number1, ll number2) {
return number1 / gcd(number1, number2) * number2;
}
ll LSB(ll n) { return (n & (-n)); }
/*-----------------------------------------ここからコード-----------------------------------------*/
int main() {
string s;
scans(s);
set<char> t;
for(const auto &aa : s){
if(t.find(aa) != t.end()){
printf("no\n");
return AC;
}
t.push(aa);
}
printf("yes\n");
Please AC;
}
| 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-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>s;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:6:8: error: 's' was not declared in this scope
6 | cin>>s;
| ^
|
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.length() ) cout << "yes" << endl;
else cout << "no" << endl;
return 0;
}
| 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:9: error: expected primary-expression before 'char'
12 | set<char> st;
| ^~~~
a.cc:14:9: error: 'st' was not declared in this scope; did you mean 's'?
14 | st.insert(s[i]);
| ^~
| s
a.cc:16:10: error: 'st' was not declared in this scope; did you mean 's'?
16 | if ( st.size() = s.length() ) cout << "yes" << endl;
| ^~
| s
|
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' was not declared in this scope
6 | cin >> S;
| ^~~
a.cc:6:10: error: 'S' was not declared in this scope
6 | cin >> S;
| ^
a.cc:7:3: error: 'string' was not declared in this scope
7 | string ans = "yes";
| ^~~~~~
a.cc:10:31: error: 'ans' was not declared in this scope
10 | if (S.at(i) == S.at(j)) ans = "no";
| ^~~
a.cc:13:3: error: 'cout' was not declared in this scope
13 | cout << ans << endl;
| ^~~~
a.cc:13:11: error: 'ans' was not declared in this scope
13 | cout << ans << endl;
| ^~~
a.cc:13:18: error: 'endl' was not declared in this scope
13 | cout << ans << endl;
| ^~~~
|
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("no");
return;
}
visited.add(c);
}
System.out.println("yes");
}
} | 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: expected primary-expression before 'char'
8 | set<char>se;
| ^~~~
a.cc:12:11: error: 'se' was not declared in this scope; did you mean 's'?
12 | se.insert(s[i]);
| ^~
| s
a.cc:13:18: error: 'se' was not declared in this scope; did you mean 's'?
13 | if(s.size()==se.size())
| ^~
| s
|
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) for(int i=x;i<=n;i++)
#define pii pair<int,int>
#define pll pair<long long ,long long>
#define gbtb ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define MS0(X) memset((X), 0, sizeof((X)))
#define MSC0(X) memset((X), '\0', sizeof((X)))
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define eps 1e-6
#define chu(x) cout<<"["<<#x<<" "<<(x)<<"]"<<endl
#define du3(a,b,c) scanf("%d %d %d",&(a),&(b),&(c))
#define du2(a,b) scanf("%d %d",&(a),&(b))
#define du1(a) scanf("%d",&(a));
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;}
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
ll powmod(ll a, ll b, ll MOD) { if (a == 0ll) {return 0ll;} a %= MOD; ll ans = 1; while (b) {if (b & 1) {ans = ans * a % MOD;} a = a * a % MOD; b >>= 1;} return ans;}
void Pv(const vector<int> &V) {int Len = sz(V); for (int i = 0; i < Len; ++i) {printf("%d", V[i] ); if (i != Len - 1) {printf(" ");} else {printf("\n");}}}
void Pvl(const vector<ll> &V) {int Len = sz(V); for (int i = 0; i < Len; ++i) {printf("%lld", V[i] ); if (i != Len - 1) {printf(" ");} else {printf("\n");}}}
inline long long readll() {long long tmp = 0, fh = 1; char c = getchar(); while (c < '0' || c > '9') {if (c == '-') fh = -1; c = getchar();} while (c >= '0' && c <= '9') tmp = tmp * 10 + c - 48, c = getchar(); return tmp * fh;}
inline int readint() {int tmp = 0, fh = 1; char c = getchar(); while (c < '0' || c > '9') {if (c == '-') fh = -1; c = getchar();} while (c >= '0' && c <= '9') tmp = tmp * 10 + c - 48, c = getchar(); return tmp * fh;}
const int maxn = 1000010;
const int inf = 0x3f3f3f3f;
/*** TEMPLATE CODE * * STARTS HERE ***/
bool vis[maxn];
char s[maxn];
int main()
{
//freopen("D:\\code\\text\\input.txt","r",stdin);
//freopen("D:\\code\\text\\output.txt","w",stdout);
cin >> s + 1;
int len = strlen(s + 1);
int isok = 1;
repd(i, 1, n)
{
if (vis[s[i]])
{
isok = 0;
break;
} else
{
vis[s[i]] = 1;
}
}
if (isok)
{
printf("yes\n");
} else
{
printf("no\n");
}
return 0;
}
| 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;
if(b) ans = "yes";
else ans = "no";
System.out.println(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();i++){
cin >> SS.at(i);
}
sort(SS.begin(),SS.end());
for(int j = 0;j<S.size()-1;j++){
if(SS.at(j) == S.at(i+1)){
ans = "no";
}
}
if(ans != "no"){
ans = "yes";
}
cout << ans << endl;
} | 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 MOD = (1e9+7);
constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }
template<class T> inline bool chmin(T& a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template<class T> inline bool chmax(T& a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
ll factorial(ll n, ll m=2) {
// calculate n!
m = max(2LL, m);
ll rtn = 1;#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 MOD = (1e9+7);
constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }
template<class T> inline bool chmin(T& a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template<class T> inline bool chmax(T& a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
ll factorial(ll n, ll m=2) {
// calculate n!
m = max(2LL, m);
ll rtn = 1;
for (ll i=m; i<=n; i++) {
rtn = (rtn * i) % MOD;
}
return rtn;
}
ll modinv(ll a, ll m) {
ll b = m, u = 1, v = 0;
while (b) {
ll t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0) u += m;
return u;
}
ll modpow(ll a, ll n) {
ll res = 1;
while (n > 0) {
if (n & 1)
res = res * a % MOD;
a = a * a % MOD;
n >>= 1;
}
return res;
}
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
string s; cin >> s;
char tmp = s[0];
rep1(i, s.size()-1) {
if (tmp == s[i]) {cout << "no" << endl; return;}
tmp = s[i];
}
cout << "yes" << endl;
return 0;
}
for (ll i=m; i<=n; i++) {
rtn = (rtn * i) % MOD;
}
return rtn;
}
ll modinv(ll a, ll m) {
ll b = m, u = 1, v = 0;
while (b) {
ll t = a / b;
a -= t * b;
swap(a, b);
u -= t * v;
swap(u, v);
}
u %= m;
if (u < 0) u += m;
return u;
}
ll modpow(ll a, ll n) {
ll res = 1;
while (n > 0) {
if (n & 1)
res = res * a % MOD;
a = a * a % MOD;
n >>= 1;
}
return res;
}
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
string s; cin >> s;
char tmp = s[0];
rep1(i, s.size()-1) {
if (tmp == s[i]) {cout << "no" << endl; return 0;}
tmp = s[i];
}
cout << "yes" << endl;
return 0;
} | 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' was not declared in this scope
33 | ll rtn = 1;#include <bits/stdc++.h>
| ^~~~
a.cc:33:31: error: 'stdc' was not declared in this scope; did you mean 'std'?
33 | ll rtn = 1;#include <bits/stdc++.h>
| ^~~~
| std
a.cc:41:1: error: expected primary-expression before 'using'
41 | using namespace std;
| ^~~~~
a.cc:45:33: error: a function-definition is not allowed here before '{' token
45 | constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
| ^
a.cc:46:33: error: a function-definition is not allowed here before '{' token
46 | constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }
| ^
a.cc:48:1: error: a template declaration cannot appear at block scope
48 | template<class T> inline bool chmin(T& a, T b) {
| ^~~~~~~~
a.cc:62:28: error: a function-definition is not allowed here before '{' token
62 | ll factorial(ll n, ll m=2) {
| ^
a.cc:71:23: error: a function-definition is not allowed here before '{' token
71 | ll modinv(ll a, ll m) {
| ^
a.cc:84:23: error: a function-definition is not allowed here before '{' token
84 | ll modpow(ll a, ll n) {
| ^
a.cc:95:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
95 | int main() {
| ^~
a.cc:95:9: note: remove parentheses to default-initialize a variable
95 | int main() {
| ^~
| --
a.cc:95:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:95:12: error: a function-definition is not allowed here before '{' token
95 | int main() {
| ^
|
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;
vector<bool> found(26);
for (int i = 0; i < s.length; i++) {
int idx = s[i] - 'a';
if (found[idx]) {
cout << "no" << endl;
return 0;
}
found[idx] = true;
}
cout << "yes" << endl;
return 0;
}
| 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 unsigned int]' (did you forget the '()' ?)
24 | for (int i = 0; i < s.length; i++) {
| ~~^~~~~~
| ()
|
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 rall(a) (a).rbegin(),(a).rend()
#define SORT(c) sort((c).begin(),(c).end())
#define ve vector
#define vi vector<int>
#define vp vector<pair<int,int>>
#define vvi vector<vector<int>>
using ll = long long;
const ll INF = LLONG_MAX / 40 - 100;
ll mod = 1e9 + 7;
int dx[] = {-1,0,1,0}, dy[] = {0,1,0,-1};
int ddx[] = {-1,0,1,-1,1,-1,0,1}, ddy[] = {1,1,1,0,0,-1,-1,-1};
vector<ll> prime;
class fact {
public:
int fmod = 1e9+7;
vector<int> fac, inv;
fact (int n, int Mod = 1e9+7) {
fmod = Mod;
fac = vector<int>(n + 1,0);
inv = vector<int>(n + 1,0);
fac[0] = 1; for (int i = 1; i < n + 1; i++) fac[i] = fac[i-1] * i % fmod;
for (int i = 0;i < n + 1;i++) inv[i] = fact::POW(fac[i],fmod-2);
}
ll nCr(ll n, ll r) {if (n<r) return 0; return (fac[n] * inv[r] % fmod) * inv[n-r] % fmod;}
ll POW(ll a, ll b) {ll c = 1; while (b > 0) {if (b & 1) {c = a * c%fmod;}a = a * a%fmod; b >>= 1;}return c;}
};
template <class T = ll> T in() {T x; cin >> x; return (x);}
void DEBUG(vector<int> a) {for(int i=0;i<a.size();i++)cout<<a[i]<<" ";cout<<endl;}
void EMP(int x) {cout<<"!!!"<<x<<"!!!"<<endl;}
ll GCD(ll a, ll b) {ll c; while (b != 0) {c = a % b; a = b; b = c;}return a;}
ll LCM(ll a, ll b) {return (a / GCD(a,b)) * b;}
ll POW(ll a, ll b) {ll c = 1; while (b > 0) {if (b & 1) {c = a * c%mod;}a = a * a%mod; b >>= 1;}return c;}
void PRI(ll n) {bool a[n + 1LL]; for (int i = 0; i < n + 1LL; i++) {a[i] = 1LL;}for (int i = 2; i < n + 1LL; i++) {if (a[i]) {prime.pb(i); ll b = i; while (b <= n) {a[b] = 0; b += i;}}}}
template <typename T> T chmin(T& a, T b) {if(a>b)a=b;return a;}
template <typename T> T chmax(T& a, T b) {if(a<b)a=b;return b;}
bool isSqrt(ll a) {return pow(sqrt(a),2) == a ? 1 : 0;}
void YesNo(bool a) {if (a) cout << "Yes"; else cout << "No"; cout << endl;}
void yesno(bool a) {if (a) cout << "yes"; else cout << "no"; cout << endl;}
void YESNO(bool a) {if (a) cout << "YES"; else cout << "NO"; cout << endl;}
long long extGCD(long long a, long long b, long long &x, long long &y) {
if (b == 0) {
x = 1;
y = 0;
return a;
}
long long d = extGCD(b, a % b, y, x);
y -= a / b * x;
return d;
}
long long mul(long long a, long long b, long long mod) {
long long keta[20] = {};
long long c = b;
long long now = 0;
while (c != 0ll) {
keta[now] = c % 10; c /= 10; now++;
}
long long res = 0;
for (int i = 19; i >= 0; --i) {
res *= 10; res %= mod;
res += keta[i] * a % mod;
}
return res % mod;
}
class BIT {
public:
vector<int> bit;
int n;
BIT(int x) : n(x), bit(vector<int>(x + 1)) {}
void add(int i, int w) {
++i;
for (int x = i; x <= n; x += (x & -x)) bit[x] += w;
}
int sum(int i) {
++i;
int ret = 0;
for (int x = i; x > 0; x -= (x & -x)) ret += bit[x];
return ret;
}
};
int add(int a, int b) {
if (a > b) swap(a, b);
if (a == 0) return -b;
return a * (b / a) * 2 + add(b % a, a);
}
map<char, int> ma;
void solve() {
string s; cin >> s;
for (auto to : s) {
ma[to]++;
}
for (auto cnt : ma) {
if (cnt != 1) {
cout << "no" << endl;
return;
} cout << "yes" << endl;
}
return;
}
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
solve();
}
| 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 long int>
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1132:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1132 | operator!=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1132:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
117 | if (cnt != 1) {
| ^
/usr/include/c++/14/bits/regex.h:1212:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator!=(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1212 | operator!=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1212:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
117 | if (cnt != 1) {
| ^
/usr/include/c++/14/bits/regex.h:1305:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1305 | operator!=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1305:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
117 | if (cnt != 1) {
| ^
/usr/include/c++/14/bits/regex.h:1379:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1379 | operator!=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1379:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
117 | if (cnt != 1) {
| ^
/usr/include/c++/14/bits/regex.h:1473:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1473 | operator!=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1473:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
117 | if (cnt != 1) {
| ^
/usr/include/c++/14/bits/regex.h:1547:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1547 | operator!=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1547:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
117 | if (cnt != 1) {
| ^
/usr/include/c++/14/bits/regex.h:1647:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1647 | operator!=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1647:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
117 | if (cnt != 1) {
| ^
/usr/include/c++/14/bits/regex.h:2213:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator!=(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2213 | operator!=(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2213:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
117 | if (cnt != 1) {
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1052:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1052 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1052:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: mismatched types 'const std::pair<_T1, _T2>' and 'int'
117 | if (cnt != 1) {
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:455:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
455 | operator!=(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:455:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'const std::reverse_iterator<_Iterator>'
117 | if (cnt != 1) {
| ^
/usr/include/c++/14/bits/stl_iterator.h:500:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
500 | operator!=(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:500:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'const std::reverse_iterator<_Iterator>'
117 | if (cnt != 1) {
| ^
/usr/include/c++/14/bits/stl_iterator.h:1686:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1686 | operator!=(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1686:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'const std::move_iterator<_IteratorL>'
117 | if (cnt != 1) {
| ^
/usr/include/c++/14/bits/stl_iterator.h:1753:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1753 | operator!=(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1753:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'const std::move_iterator<_IteratorL>'
117 | if (cnt != 1) {
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postypes.h:197:5: note: candidate: 'template<class _StateT> bool std::operator!=(const fpos<_StateT>&, const fpos<_StateT>&)'
197 | operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:197:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'const std::fpos<_StateT>'
117 | if (cnt != 1) {
| ^
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:243:5: note: candidate: 'template<class _T1, class _T2> bool std::operator!=(const allocator<_CharT>&, const allocator<_T2>&)'
243 | operator!=(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:243:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'const std::allocator<_CharT>'
117 | if (cnt != 1) {
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:651:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
651 | operator!=(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:651:5: note: template argument deduction/substitution failed:
a.cc:117:20: note: 'std::pair<const char, long long int>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
117 | if (cnt != 1) {
| ^
/usr/include/c++/14/string_view:658:5: note: candidate: 'template< |
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(){
string s;
cin >> s;
int alpha[26] = {};
REP(i,s.size())
{
alpha[s[i] - 'a']++;
}
int iMax = 0;
REP(i,26)
{
iMax = max(iMax, alpha[i]);
}
if(iMax <= 1)
{
res = "yes";
}
else
{
res = "no";
}
cout << res << endl;
return 0;
}
| 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 this scope
39 | cout << res << endl;
| ^~~
|
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;
}
}
}
if(f)cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
} | 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 | string s;cin >> s;
| ^
a.cc:17:10: error: 'cout' was not declared in this scope
17 | if(f)cout << "Yes" << endl;
| ^~~~
a.cc:17:27: error: 'endl' was not declared in this scope
17 | if(f)cout << "Yes" << endl;
| ^~~~
a.cc:18:10: error: 'cout' was not declared in this scope
18 | else cout << "No" << endl;
| ^~~~
a.cc:18:26: error: 'endl' was not declared in this scope
18 | else cout << "No" << endl;
| ^~~~
|
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(10,i+1)))*10;
return m;
}
int gcd(int a,int b)
{
int r, tmp;
/* 自然数 a > b を確認・入替 */
if(a<b){
tmp = a;
a = b;
b = tmp;
}
/* ユークリッドの互除法 */
r = a % b;
while(r!=0){
a = b;
b = r;
r = a % b;
}
return b;
}
int fac(int n){
int m=1;
while(n>=1) m*=n,n--;
return m;
}
int vec_sum(vector<int> v){
int n=0;
for(int i=0;i<v.size();i++) n+=v[i];
return n;
}
///////////////////////////
int main() {
string s;
bool flag=true;
cin>>s;
map<char,int> mp;
rep(i,s.size()){
mp[s[i]]++;
}
rep(auto c:mp){
if(c.second>=2){
flag=false;
break;
}
}
if(flag){
cout<<"yes"<<endl;
}else{
cout<<"no"<<endl;
}
}
/////////////////////////// | 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 scope
77 | rep(auto c:mp){
| ^~~
|
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 << "no";
return 0;
} | 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: error: 'f' was not declared in this scope
8 | bitset<30> f;
| ^
|
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 = false;
}
}
}
if(ans){
cout << "yes" << endl;
}else{
cout << "no" << endl;
}
return 0;
} | 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.size()){
if(a.at(i)==a.at(j))
b++;
}
}
bool c=true;
if(b>a.size())
c=false;
if(c)
cout<<"yes";
else
cout<<"no";
} | 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).rbegin(), (obj).rend()
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
int len = s.length();
sort(ALL(s));
s.erase(unique(ALL(s), s.end()));
if (len != s.size()) {
cout << "no\n";
} else {
cout << "yes\n";
}
return 0;
}
| 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::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >; _Iterator2 = __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >; _Compare = __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >]':
/usr/include/c++/14/bits/stl_algo.h:869:20: required from '_ForwardIterator std::__unique(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >; _BinaryPredicate = __gnu_cxx::__ops::_Iter_comp_iter<__gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> > >]'
869 | if (!__binary_pred(__dest, __first))
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:933:27: required from '_FIter std::unique(_FIter, _FIter, _BinaryPredicate) [with _FIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >; _BinaryPredicate = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >]'
933 | return std::__unique(__first, __last,
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
934 | __gnu_cxx::__ops::__iter_comp_iter(__binary_pred));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:18:19: required from here
18 | s.erase(unique(ALL(s), s.end()));
| ~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:158:30: error: no match for call to '(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >) (char&, char&)'
158 | { return bool(_M_comp(*__it1, *__it2)); }
| ~~~~~~~^~~~~~~~~~~~~~~~
|
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;
return 0;
}
| 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;
return 0;
}
| 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 /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed:
a.cc:15:16: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'std::vector<int>')
15 | c_max = max(c_max, c);
| ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5706 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5716 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: template argument deduction/substitution failed:
a.cc:15:16: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
15 | c_max = max(c_max, c);
| ~~~^~~~~~~~~~
|
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; i < s.length; i++){
if()
| 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");}}
^
symbol: variable S
location: class Main
1 error
|
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: error: expected declaration before '}' token
15 | }
| ^
a.cc:16:9: error: expected unqualified-id before 'if'
16 | if(flg==1){
| ^~
a.cc:19:9: error: expected unqualified-id before 'else'
19 | else{
| ^~~~
a.cc:22:9: error: expected unqualified-id before 'return'
22 | return 0;
| ^~~~~~
a.cc:23:1: error: expected declaration before '}' token
23 | }
| ^
|
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 = long long;
using VI = vector<int>;
int main(){
string s;cin >> s;
string t = s;
sort(t.begin(),t.end());
t.erace(unique(t.begin(),t.end()),t.end());
cout << s.size()==t.size()?"yes":"no" << endl;
return 0;
}
| 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::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~
| | |
| | std::__cxx11::basic_string<char>::size_type {aka long unsigned int}
| std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
a.cc:19:19: note: candidate: 'operator==(int, std::__cxx11::basic_string<char>::size_type {aka long unsigned int})' (built-in)
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~
a.cc:19:19: note: no known conversion for argument 1 from 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postype |
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 = long long;
using VI = vector<int>;
int main(){
string s;cin >> s;
string t = s;
sort(t.begin(),t.end());
t.erace(unique(t.begin(),t.end(),t.end()));
cout << s.size()==t.size()?"yes":"no" << endl;
return 0;
}
| 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::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~
| | |
| | std::__cxx11::basic_string<char>::size_type {aka long unsigned int}
| std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
a.cc:19:19: note: candidate: 'operator==(int, std::__cxx11::basic_string<char>::size_type {aka long unsigned int})' (built-in)
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~
a.cc:19:19: note: no known conversion for argument 1 from 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:19:28: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
19 | cout << s.size()==t.size()?"yes":"no" << endl;
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postype |
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++.h:158,
from a.cc:1:
/usr/include/c++/14/bits/stl_set.h:568:9: note: candidate: 'template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
568 | insert(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:568:9: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:511:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::rebind<std::__cxx11::basic_string<char> >; typename _Alloc::value_type = std::__cxx11::basic_string<char>; value_type = std::__cxx11::basic_string<char>]'
511 | insert(const value_type& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:511:32: note: no known conversion for argument 1 from 'char' to 'const std::set<std::__cxx11::basic_string<char> >::value_type&' {aka 'const std::__cxx11::basic_string<char>&'}
511 | insert(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_set.h:520:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(value_type&&) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::rebind<std::__cxx11::basic_string<char> >; typename _Alloc::value_type = std::__cxx11::basic_string<char>; value_type = std::__cxx11::basic_string<char>]'
520 | insert(value_type&& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:520:27: note: no known conversion for argument 1 from 'char' to 'std::set<std::__cxx11::basic_string<char> >::value_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
520 | insert(value_type&& __x)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_set.h:548:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, const value_type&) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; const_iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; value_type = std::__cxx11::basic_string<char>]'
548 | insert(const_iterator __position, const value_type& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:548:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:553:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, value_type&&) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; const_iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; value_type = std::__cxx11::basic_string<char>]'
553 | insert(const_iterator __position, value_type&& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:553:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:580:7: note: candidate: 'void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
580 | insert(initializer_list<value_type> __l)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:580:43: note: no known conversion for argument 1 from 'char' to 'std::initializer_list<std::__cxx11::basic_string<char> >'
580 | insert(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_set.h:600:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::insert_return_type std::set<_Key, _Compare, _Alloc>::insert(node_type&&) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; insert_return_type = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::insert_return_type; node_type = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::node_type]'
600 | insert(node_type&& __nh)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:600:26: note: no known conversion for argument 1 from 'char' to 'std::set<std::__cxx11::basic_string<char> >::node_type&&' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::node_type&&'}
600 | insert(node_type&& __nh)
| ~~~~~~~~~~~~^~~~
/usr/include/c++/14/bits/stl_set.h:605:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, node_type&&) [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; const_iterator = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator; node_type = std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::node_type]'
605 | insert(const_iterator __hint, node_type&& __nh)
| ^~~~~~
/usr/include/c++/14/bits/stl_set.h:605:7: note: candidate expects 2 arguments, 1 provided
|
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");
System.exit(0);
}
charCnt[c - 'a']++;
}
System.out.println("yes");
}
} | Main.java:4: error: '(' expected
public static void Main {
^
1 error
|
s264844170 | p03698 | C++ | /*
∧_∧ やあ
(´・ω・`) / ようこそ、バーボンハウスへ。
/∇y:::::\ [ ̄] このテキーラはサービスだから、まず飲んで落ち着いて欲しい。
|:⊃:|:::::| |──|
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄| うん、「また」なんだ。済まない。
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄| ̄ 仏の顔もって言うしね、謝って許してもらおうとも思っていない。
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄/|
∇ ∇ ∇ ∇ /./| でも、この提出を見たとき、君は、きっと言葉では言い表せない
┴ ┴ ┴ ┴ / / | 「ときめき」みたいなものを感じてくれたと思う。
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄|/ | 殺伐としたコンテストの中で、そういう気持ちを忘れないで欲しい
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ | そう思って、この提出を投げたんだ。
(⊆⊇) (⊆⊇) (⊆⊇) |
|| || || | じゃあ、判定を聞こうか。
./|\ /|\ /|\
*/
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <array>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define fst first
#define snd second
#define mp make_pair
#define ALL(obj) (obj).begin(),(obj).end()
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i = (b-1);i>=a;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define SIZE(x) ((int)(x).size())
#define debug(x) cerr << #x << " -> " << x << " (line:" << __LINE__ << ")" << '\n';
#define debugpair(x, y) cerr << "(" << #x << ", " << #y << ") -> (" << x << ", " << y << ") (line:" << __LINE__ << ")" << '\n';
typedef long long lint;
typedef pair<int, int> pint;
typedef pair<lint, lint> plint;
typedef vector<lint> vec;
typedef vector<vector<lint>> matrix;
typedef priority_queue<lint> p_que;
typedef priority_queue<lint, vector<lint>, greater<lint>> p_que_rev;
const lint INF = INT_MAX;
const lint LINF = LLONG_MAX;
const lint MOD = 1000000000 + 7;
const double EPS = 1e-9;
const double PI = acos(-1);
const int di[]{0, -1, 0, 1, -1, -1, 1, 1};
const int dj[]{1, 0, -1, 0, 1, -1, -1, 1};
lint gcd(lint a, lint b) {
lint r;
while (b != 0) {
r = a % b;
a = b;
b = r;
}
return a;
}
lint lcm(lint a, lint b) {
return (a / gcd(a, b)) * b;
}
lint power(lint x, lint n, lint mod = MOD) {
lint ret = 1;
while(n > 0) {
if(n & 1){
(ret *= x) %= mod;
}
(x *= x) %= mod;
n >>= 1;
}
return ret;
}
vector<lint> make_power(int n, lint base){
lint num = 1;
vector<lint> ret;
for (int i=0; i<=n; ++i){
ret.push_back(num);
num *= base;
}
return ret;
}
int main()
{
cin.tie(0);
ios_base::sync_with_stdio(false);
string s;
cin >> s;
int l = s.length();
int cnt[26];
REP(i, 26){
cnt[i] = 0;
}
REP(i, l){
cnt[s[i] - 'a']++;
}
bool flag = true;
REP(i, 26){
if(cnt[i] >= 2){
flag = false;
}
}
if(flag){
cout << "yes" << endl;
}
else {
cout << "no" << endl;
}
cout << ans << endl;
} | 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++){
| ~ ^
| )
a.cc:8:37: error: 'i' was not declared in this scope
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){
cout << "yes" << endl;
}else{
cout << "no" << endl;
}
} | 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++;
}
if(count == 0)System.out.println("yes");
else System.out.println("no");
}
}
| 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++;
}
if(count = 0)System.out.println("yes");
else System.out.println("no");
}
}
| 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 types: int cannot be converted to boolean
if(count = 0)System.out.println("yes");
^
3 errors
|
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++;
}
if(count = 0)System.out.println("yes");
else System.out.println("no")
}
} | 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(); i++){
int tmp = S[i] - 'a';
if(cnt[tmp] > 0){
cout << "no" << endl;
return 0;
}
cnt[tmp]++;
}
cout << "yes" << endl;
}
| 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 'int'?
20 | if(cnt[tmp] > 0){
| ^~~
| int
a.cc:24:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
24 | cnt[tmp]++;
| ^~~
| int
|
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;
return 0;
} | 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++){
| ^
| ;
a.cc:16:3: error: 'retturn' was not declared in this scope
16 | retturn 0;
| ^~~~~~~
|
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;
vector<int>a(26);
rep(i,s.size()){
a[s[i]-'a']++;
}
sort(a.begin(),a.end());
reverse(a.begin(),a.end());
rep(i,a.size()){
if(a[i]==1)cnt++;
}
if(cnt==s.size())cout<<"yes"<<endl;
else cout<<"no"<<endl;
} | 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;
| ^~~
| int
|
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;
vector<int>a(s.size());
rep(i,n){
a[s[i]-'a']++;
}
if(a.size()==26)
cout<<"yes"<<endl;
else cout<<"no"<<endl;
} | 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 = "no";
}
}
}
System.out.println(ans);
}
}
| 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]]++;
}
printf("yes\n");
return 0;
}
| 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 (flag1 == 0)
{
cout << "yes";
}
else
{
cout << "no";
}
return 0;
} | 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
cout << "no" << endl;
}
| 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");}
else {printf("no\n";)}
}
return 0;
} | 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: note: expected 'char * restrict' but argument is of type 'int *'
654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
| ~~~~~~~~~~~~~~~~~^~~
main.c:5:20: error: passing argument 3 of 'fgets' from incompatible pointer type [-Wincompatible-pointer-types]
5 | while(fgets(k,26,scanf) != NULL) {
| ^~~~~
| |
| int (*)(const char *, ...)
/usr/include/stdio.h:654:69: note: expected 'FILE * restrict' but argument is of type 'int (*)(const char *, ...)'
654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
| ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:6:8: error: passing argument 1 of 'fgets' from incompatible pointer type [-Wincompatible-pointer-types]
6 | fgets(k,26,scanf);
| ^
| |
| int *
/usr/include/stdio.h:654:38: note: expected 'char * restrict' but argument is of type 'int *'
654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
| ~~~~~~~~~~~~~~~~~^~~
main.c:6:13: error: passing argument 3 of 'fgets' from incompatible pointer type [-Wincompatible-pointer-types]
6 | fgets(k,26,scanf);
| ^~~~~
| |
| int (*)(const char *, ...)
/usr/include/stdio.h:654:69: note: expected 'FILE * restrict' but argument is of type 'int (*)(const char *, ...)'
654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
| ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:8:27: error: expected ')' before 'k'
8 | while (k[i] - 'a' >= 0 k[i] - 'a') {
| ~ ^~
| )
main.c:16:24: error: expected ')' before ';' token
16 | else {printf("no\n";)}
| ~ ^
| )
main.c:16:26: error: expected ';' before '}' token
16 | else {printf("no\n";)}
| ^
| ;
|
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) sort((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define MOD 1000000007
using namespace std;
int main(){
string S;
cin>>S;
bool CAN=true;
REP(i,N-1){
FOR(j,i+1,N){
if(S.at(i)!=S.at(j)) CAN=false;
}
}
if(CAN) cout<<"yes"<<endl;
else cout<<"no"<<endl;
} | 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 | REP(i,N-1){
| ^~~
|
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;
}
}
printf("yes\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());
| ~^~~~~~~~~
| | |
| | std::__cxx11::basic_string<char>::size_type {aka long unsigned int}
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)'
627 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
11 | sort(S, S+S.size());
| ^
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)'
1798 | operator+(typename move_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
11 | sort(S, S+S.size());
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.h:3598:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3598 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3598:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
11 | sort(S, S+S.size());
| ^
/usr/include/c++/14/bits/basic_string.h:3616:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3616 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3616:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>'
11 | sort(S, S+S.size());
| ^
/usr/include/c++/14/bits/basic_string.h:3635:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3635 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3635:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
11 | sort(S, S+S.size());
| ^
/usr/include/c++/14/bits/basic_string.h:3652:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3652 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3652:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: mismatched types 'const _CharT*' and 'long unsigned int'
11 | sort(S, S+S.size());
| ^
/usr/include/c++/14/bits/basic_string.h:3670:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
3670 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3670:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: deduced conflicting types for parameter '_CharT' ('char' and 'long unsigned int')
11 | sort(S, S+S.size());
| ^
/usr/include/c++/14/bits/basic_string.h:3682:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3682 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3682:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
11 | sort(S, S+S.size());
| ^
/usr/include/c++/14/bits/basic_string.h:3689:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3689 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3689:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
11 | sort(S, S+S.size());
| ^
/usr/include/c++/14/bits/basic_string.h:3696:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3696 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3696:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
11 | sort(S, S+S.size());
| ^
/usr/include/c++/14/bits/basic_string.h:3719:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3719 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3719:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>'
11 | sort(S, S+S.size());
| ^
/usr/include/c++/14/bits/basic_string.h:3726:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3726 | operator+(_CharT __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3726:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
11 | sort(S, S+S.size());
| ^
/usr/include/c++/14/bits/basic_string.h:3733:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const _CharT*)'
3733 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3733:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: mismatched types 'const _CharT*' and 'long unsigned int'
11 | sort(S, S+S.size());
| ^
/usr/include/c++/14/bits/basic_string.h:3740:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, _CharT)'
3740 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3740:5: note: template argument deduction/substitution failed:
a.cc:11:22: note: deduced conflicting types for parameter '_CharT' ('char' and 'long unsigned int')
11 | sort(S, S+S.size());
| ^
In file included from /usr/include/c++/14/ccomplex:39,
from /usr/in |
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<<"yes"<<endl;
}
| 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{
| ^
a.cc:4:20: error: 'cin' does not name a type
4 | int a=0;string s;cin>>s;
| ^~~
a.cc:6:3: error: expected unqualified-id before 'for'
6 | for(int i=0;i<s.size();i++)t.at(i)=s.at(i);
| ^~~
a.cc:6:15: error: 'i' does not name a type
6 | for(int i=0;i<s.size();i++)t.at(i)=s.at(i);
| ^
a.cc:6:26: error: 'i' does not name a type
6 | for(int i=0;i<s.size();i++)t.at(i)=s.at(i);
| ^
a.cc:7:7: error: expected constructor, destructor, or type conversion before '(' token
7 | sort(t.begin(),t.end());
| ^
a.cc:8:3: error: expected unqualified-id before 'for'
8 | for(int j=0;j<s.size()-1;j++){
| ^~~
a.cc:8:15: error: 'j' does not name a type
8 | for(int j=0;j<s.size()-1;j++){
| ^
a.cc:8:28: error: 'j' does not name a type
8 | for(int j=0;j<s.size()-1;j++){
| ^
a.cc:14:3: error: expected unqualified-id before 'if'
14 | if(a>0)cout<<"no"<<endl;
| ^~
a.cc:15:3: error: expected unqualified-id before 'else'
15 | else cout<<"yes"<<endl;
| ^~~~
a.cc:16:1: error: expected declaration before '}' token
16 | }
| ^
|
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";
}
cout << ans << endl;
}
}
} | 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::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
12 | for(string i = 0 - 1; i < S.length(); i++){
| ~ ^ ~~~~~~~~~~
| | |
| | std::__cxx11::basic_string<char>::size_type {aka long unsigned int}
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:12:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
12 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:12:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
12 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:12:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
12 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:12:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
12 | for(string i = 0 - 1; i < S.length(); i++){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:12:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
12 | for(string i = 0 - 1; i < S.length(); i++){
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:12:40: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
12 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:12:40: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
12 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:12:40: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'long unsigned int'
12 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:12:40: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
12 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed:
a.cc:12:40: note: mismatched types 'const _CharT*' and 'long unsigned int'
12 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3901 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed:
a.cc:12:40: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>'
12 | for(string i = 0 - 1; i < S.length(); i++){
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2600 | operator<(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed:
a.cc:12:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::tuple<_UTypes ...>'
12 | for(string i = 0 - 1; i < S.length(); i++){
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::error_code&'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)'
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::error_condition&'
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
a.cc:12:44: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
12 | for(string i = 0 - 1; i < S.length(); i++){
| ~^~
a.cc:13:24: error: no |
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";
}
cout << ans << endl;
}
}
} | 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' {aka 'std::__cxx11::basic_string<char>'} requested
13 | for(string i = 0 - 1; i < S.length(); i++){
| ~~^~~
a.cc:13:29: 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'})
13 | for(string i = 0 - 1; i < S.length(); i++){
| ~ ^ ~~~~~~~~~~
| | |
| | std::__cxx11::basic_string<char>::size_type {aka long unsigned int}
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:13:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
13 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:13:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
13 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:13:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
13 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:13:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
13 | for(string i = 0 - 1; i < S.length(); i++){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:13:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
13 | for(string i = 0 - 1; i < S.length(); i++){
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:13:40: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
13 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:13:40: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
13 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:13:40: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'long unsigned int'
13 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:13:40: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
13 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed:
a.cc:13:40: note: mismatched types 'const _CharT*' and 'long unsigned int'
13 | for(string i = 0 - 1; i < S.length(); i++){
| ^
/usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3901 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed:
a.cc:13:40: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>'
13 | for(string i = 0 - 1; i < S.length(); i++){
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2600 | operator<(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed:
a.cc:13:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::tuple<_UTypes ...>'
13 | for(string i = 0 - 1; i < S.length(); i++){
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::error_code&'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)'
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::error_condition&'
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~ |
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" << endl;
}
cout << ans << endl;
}
}
} | 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" << endl;
}
cout << ans << endl;
}
}
} | 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 i = 0 - 1; i < S.length(); i++){
| ^
|
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" << endl;
}
cout << ans << endl;
}
}
} | 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 i = 0 + 1; i < S.length(); i++){
| ^
|
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;
}
cout << "yes" << 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;
}
cout << "yes" << endl;
}
} | 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 'main()::<lambda()>')
14 | if(S[i] == [j]){
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::fpos<_StateT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::allocator<_CharT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::pair<_T1, _T2>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char'
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char'
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: 'main()::<lambda()>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const _CharT*' and 'char'
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::tuple<_UTypes ...>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)'
234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types |
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 {
cout << "yes" << endl;
}
}
} | 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 'main()::<lambda()>')
14 | if(S[i] == [j]){
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::fpos<_StateT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::allocator<_CharT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::pair<_T1, _T2>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char'
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char'
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: 'main()::<lambda()>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const _CharT*' and 'char'
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::tuple<_UTypes ...>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)'
234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types |
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 {
cout << "yes" << endl;
}
}
} | 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 'main()::<lambda()>')
14 | if(S[i] == [j]){
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::fpos<_StateT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::allocator<_CharT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::pair<_T1, _T2>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char'
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char'
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: 'main()::<lambda()>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const _CharT*' and 'char'
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types 'const std::tuple<_UTypes ...>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(S[i] == [j]){
| ^
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)'
234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: mismatched types |
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 std::__cxx11::basic_string<char>'} has no member named 'sizs'; did you mean 'size'?
9 | for(int i=0;i<s.sizs();i++){
| ^~~~
| size
|
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>}
| int
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::pair<_T1, _T2>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
6 | for(int i=1;i<s;i++){
| ^
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution fa |
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;
}
}
std::cout << "yes" << std::endl;
}
| 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/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> s;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:12: error: 's' was not declared in this scope
8 | cin >> s;
| ^
|
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) {
cout << "yes" << endl;
}
else {
cout << "no" << endl;
}
} | 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 <cstring>
2 | using namespace std;
|
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] == S[j]) ok = false;
}
}
if(ok) cout << "Yes" <<endl;
else cout << "No" <<endl;
}
| 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 v:s){
int tmp = v - 'a';
a[tmp]++;
if(a[tmp]>=2){
cout<<"no"<<endl;
return 0;
}
}
cout<<"yes"<<endl;
return 0;
} | 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 unsigned int]' (did you forget the '()' ?)
8 | for (int i=0; i<s.size; i++) {
| ~~^~~~
| ()
a.cc:9:9: error: 'S' was not declared in this scope
9 | num[S[i] - 'a']++;
| ^
|
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:1238:5: note: 'std::begin'
1238 | begin(const valarray<_Tp>& __va) noexcept
| ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note: 'std::filesystem::__cxx11::begin'
608 | begin(recursive_directory_iterator __iter) noexcept
| ^~~~~
a.cc:9:17: error: 'end' was not declared in this scope
9 | for(auto& s : S){
| ^
a.cc:9:17: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note: 'std::end'
1265 | end(const valarray<_Tp>& __va) noexcept
| ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note: 'std::filesystem::__cxx11::end'
613 | end(recursive_directory_iterator) noexcept
| ^~~
a.cc:12:14: error: request for member 'size' in 'S', which is of non-class type 'int'
12 | cout << (S.size() == T.size() ? "yes" : "no") << endl;
| ^~~~
|
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.end());
#define pb(a) push_back(a)
#define INF 999999999999999999
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
using namespace std;
int main(int argc, char const *argv[])
{
string s;
cin >> s;
SORT(s, s.size());
rep(i, s.size() - 1)
{
if (s[i] == s[i + 1])
{
cout << "yes" << endl;
break;
return 0;
}
}
cout << "no" << endl;
return 0;
}
| 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);
| ^
a.cc:17:5: note: in expansion of macro 'SORT'
17 | SORT(s, s.size());
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)'
627 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: template argument deduction/substitution failed:
a.cc:17:20: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
17 | SORT(s, s.size());
| ^
a.cc:6:32: note: in definition of macro 'SORT'
6 | #define SORT(v, n) sort(v, v + n);
| ^
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)'
1798 | operator+(typename move_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: template argument deduction/substitution failed:
a.cc:17:20: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
17 | SORT(s, s.size());
| ^
a.cc:6:32: note: in definition of macro 'SORT'
6 | #define SORT(v, n) sort(v, v + n);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.h:3598:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3598 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3598:5: note: template argument deduction/substitution failed:
a.cc:17:20: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
17 | SORT(s, s.size());
| ^
a.cc:6:32: note: in definition of macro 'SORT'
6 | #define SORT(v, n) sort(v, v + n);
| ^
/usr/include/c++/14/bits/basic_string.h:3616:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3616 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3616:5: note: template argument deduction/substitution failed:
a.cc:17:20: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>'
17 | SORT(s, s.size());
| ^
a.cc:6:32: note: in definition of macro 'SORT'
6 | #define SORT(v, n) sort(v, v + n);
| ^
/usr/include/c++/14/bits/basic_string.h:3635:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3635 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3635:5: note: template argument deduction/substitution failed:
a.cc:17:20: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
17 | SORT(s, s.size());
| ^
a.cc:6:32: note: in definition of macro 'SORT'
6 | #define SORT(v, n) sort(v, v + n);
| ^
/usr/include/c++/14/bits/basic_string.h:3652:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3652 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3652:5: note: template argument deduction/substitution failed:
a.cc:17:20: note: mismatched types 'const _CharT*' and 'long unsigned int'
17 | SORT(s, s.size());
| ^
a.cc:6:32: note: in definition of macro 'SORT'
6 | #define SORT(v, n) sort(v, v + n);
| ^
/usr/include/c++/14/bits/basic_string.h:3670:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
3670 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3670:5: note: template argument deduction/substitution failed:
a.cc:17:20: note: deduced conflicting types for parameter '_CharT' ('char' and 'long unsigned int')
17 | SORT(s, s.size());
| ^
a.cc:6:32: note: in definition of macro 'SORT'
6 | #define SORT(v, n) sort(v, v + n);
| ^
/usr/include/c++/14/bits/basic_string.h:3682:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3682 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3682:5: note: template argument deduction/substitution failed:
a.cc:17:20: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
17 | SORT(s, s.size());
| ^
a.cc:6:32: note: in definition of macro 'SORT'
6 | #define SORT(v, n) sort(v, v + n);
| ^
/usr/include/c++/14/bits/basic_string.h:3689:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3689 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3689:5: note: template argument deduction/substitution failed:
a.cc:17:20: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
17 | SORT(s, s.size());
| ^
a.cc:6:32: note: in definition of macro 'SORT'
6 | #define SORT(v, n) sort(v, v + n);
| ^
/usr/include/c++/14/bits/basic_string.h:3696:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3696 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3696:5: note: template argument deduction/substitution failed:
a.cc:17:20: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
17 | SORT(s, s.size());
| ^
a.cc:6:32: note: in definition of macro 'SORT'
6 | #define SORT(v, n) sort(v, v + n);
| ^
/usr/include/c++/14/bits/basic_string.h:3719:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3719 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3719:5: note: template argument deduction/substitution failed:
a.cc:17:20: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>'
17 | SORT(s, s.size());
| ^
a.cc:6:32: note: in definition of macro 'SORT'
6 | #define SORT(v, n) sort(v, v + n);
| ^
/usr/include/c++/14/bits/basic_string.h:3726:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3726 | operator+(_CharT __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3726:5: note: template argument deduction/substitution failed:
a.cc:17:20: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
17 | SORT(s, s.size() |
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[i]==chars[i+1]){
System.out.println("no")
return;
}
}
System.out.println("yes");
}
}
| 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]==chars[i+1]){
System.out.println("no");
return;
}
}
System.out.println("yes");
}
}
| 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]==chars[i+1]){
System.out.println("no")
return;
}
}
System.out.println("yes");
}
} | 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")
^
3 errors
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.