eolymp
bolt
Попробуйте наш новый интерфейс для отправки задач
Задачи

Прием у директора

опубликовано 01.02.2024, 12:58:46

include <iostream>

include <vector>

include <algorithm>

include <cstring>

using namespace std; int main() { iosbase::syncwith_stdio(0); cin.tie(0); cout.tie(0); int count = 1; int n; cin >> n; vector<pair<string, string>> v; for (int i = 0; i < n; i++) { string s, st; cin >> s >> st; v.push_back(make_pair(s, st)); } sort(v.begin(), v.end()); for(int i = 1; i <= n; i++){ if(v[i].first > v[i - 1].second){ count++; } } cout << count << endl; return 0; }

this code accepted in may but now i want resend it it give 93% WTF?????!