ამოხსნების სტატუსი

ამ გვერდზე თქვენ იხილავთ გაგზავნილი ამოხსნების სტატუსს.


გაგზავნის თარიღი: 10.09.2021 15:42:14

ამოცანა: მილანური პიცა

მომხმარებელი: TsotneB

ვერდიქტი: ამოუხსნელი

შეფასება: 0 ქულა







3include <bits/stdc++.h>
using namespace std;
int main() {
    int n;
    cin>>n;
    vector <pair <int,string> > p;
    for (int i = 0;i < n;i++) {
        string s;
        int q;
        cin>>s>>q;
        p.push_back({(-1) * q,s});
    }
    sort (p.begin(),p.end());
    cout<<p[0].second;
    return 0;
}
PROB_cpp_UID1644PID436_e1cf4c/main.cpp:1:1: error: expected unqualified-id before numeric constant
 3include <bits/stdc++.h>
 ^~~~~~~~
PROB_cpp_UID1644PID436_e1cf4c/main.cpp: In function 'int main()':
PROB_cpp_UID1644PID436_e1cf4c/main.cpp:5:5: error: 'cin' was not declared in this scope
     cin>>n;
     ^~~
PROB_cpp_UID1644PID436_e1cf4c/main.cpp:6:5: error: 'vector' was not declared in this scope
     vector <pair <int,string> > p;
     ^~~~~~
PROB_cpp_UID1644PID436_e1cf4c/main.cpp:6:13: error: 'pair' was not declared in this scope
     vector <pair <int,string> > p;
             ^~~~
PROB_cpp_UID1644PID436_e1cf4c/main.cpp:6:19: error: expected primary-expression before 'int'
     vector <pair <int,string> > p;
                   ^~~
PROB_cpp_UID1644PID436_e1cf4c/main.cpp:8:9: error: 'string' was not declared in this scope
         string s;
         ^~~~~~
PROB_cpp_UID1644PID436_e1cf4c/main.cpp:10:14: error: 's' was not declared in this scope
         cin>>s>>q;
              ^
PROB_cpp_UID1644PID436_e1cf4c/main.cpp:11:9: error: 'p' was not declared in this scope
         p.push_back({(-1) * q,s});
         ^
PROB_cpp_UID1644PID436_e1cf4c/main.cpp:13:11: error: 'p' was not declared in this scope
     sort (p.begin(),p.end());
           ^
PROB_cpp_UID1644PID436_e1cf4c/main.cpp:13:28: error: 'sort' was not declared in this scope
     sort (p.begin(),p.end());
                            ^
PROB_cpp_UID1644PID436_e1cf4c/main.cpp:14:5: error: 'cout' was not declared in this scope
     cout<<p[0].second;
     ^~~~