Submission #475125

#TimeUsernameProblemLanguageResultExecution timeMemory
475125_L__Sifra (COCI21_sifra)C++17
50 / 50
1 ms204 KiB
// This code is written by _L__ #include <bits/stdc++.h> #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx2") #pragma GCC optimize("-ffast-math") #pragma GCC optimize("-funroll-loops") #pragma GCC optimize("-funroll-all-loops,-fpeel-loops,-funswitch-loops") using namespace std; #define endl '\n' #define F_word ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); typedef long long ll; typedef long double ld; const ll mod = 1e9+7, N = 2e5, inf = 1e11; const ld E = 1e-6; #define ff first #define ss second int main(void){ F_word; string s; cin >> s; bool f = 1; set<string> st; string ans = ""; for(int i = 0; i < s.size(); ++i){ if(s[i] >= 'a' && s[i] <= 'z'){ if(ans.size()){ st.insert(ans); ans = ""; } } else { ans += s[i]; } } if(ans.size()) st.insert(ans); cout << st.size() << endl; }

Compilation message (stderr)

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