Submission #990702

# Submission time Handle Problem Language Result Execution time Memory
990702 2024-05-31T04:43:34 Z vjudge1 Dijamant (COI16_dijament) C++17
27 / 100
63 ms 348 KB
#include <bits/stdc++.h>
using namespace std;

const int N = 1005;
int n;
bool derived[N][N];
map<string, int> mp;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    
    cin >> n;
    for (int i = 0; i < n; i ++){
        string inp;
        cin >> inp;
        
        vector<string> vecs;
        while (inp != ";"){
            if (inp != ":")
                vecs.push_back(inp);
            cin >> inp;
        }

        vector<int> vec;
        bool good = 1;
        if (mp.find(vecs[0]) != mp.end())
            good = 0;
        for (int i = 1; i < vecs.size(); i ++)
            if (mp.find(vecs[i]) == mp.end())
                good = 0;

        if (!good){
            cout << "greska" << endl;
            continue;
        }

        cout << "ok" << endl;
        mp[vecs[0]] = mp.size();
    }
}

Compilation message

dijament.cpp: In function 'int main()':
dijament.cpp:29:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   29 |         for (int i = 1; i < vecs.size(); i ++)
      |                         ~~^~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Incorrect 1 ms 348 KB Output isn't correct
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 63 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -