제출 #372700

#제출 시각아이디문제언어결과실행 시간메모리
372700NimbostratusSifra (COCI21_sifra)C++17
50 / 50
1 ms364 KiB
#include <bits/stdc++.h> using namespace std; #define eb emplace_back #define pb push_back #define ppb pop_back #define ub upper_bound #define lb lower_bound #define bs binary_search #define cln(a,s) memset((a),0,sizeof((a)[0])*(s)) #define all(x) (x).begin() , (x).end() #define fi first #define se second #define int int using pii = pair<int,int>; using ll = long long; const int maxn = 2e5 + 5; const int inf = 1e9; const int mod = 1e9+7; string s; set<string> st; int32_t main () { //freopen("in","r",stdin); freopen("out","w",stdout); ios_base::sync_with_stdio(0); cout.tie(0); cin.tie(0); cin >> s; for(int i=0;i<s.size();i++) { if(isalpha(s[i])) continue; string cur; while(i < s.size() and isdigit(s[i])) { cur += s[i]; i++; } st.insert(cur); i--; } cout << st.size() << endl; }

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp: In function 'int32_t main()':
Main.cpp:27:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   27 |  for(int i=0;i<s.size();i++) {
      |              ~^~~~~~~~~
Main.cpp:30:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   30 |   while(i < s.size() and isdigit(s[i])) {
      |         ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...