제출 #1024046

#제출 시각아이디문제언어결과실행 시간메모리
1024046kustizusSifra (COCI21_sifra)C++17
50 / 50
1 ms452 KiB
#include <bits/stdc++.h> #define ll long long int using namespace std; ll ans=0; string s,t=""; unordered_map <string,ll> mp; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); getline (cin,s); for (ll i=0;i<s.size();i++) if (s[i]>='0' && s[i]<='9') t+=s[i]; else if (t!=""){ if (mp[t]==0) ans++; mp[t]=1; t=""; } if (t!=""){ if (mp[t]==0) ans++; mp[t]=1; } cout<<ans; }

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

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