# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
990755 | 2024-05-31T07:16:38 Z | vjudge1 | Dijamant (COI16_dijament) | C++17 | 105 ms | 436 KB |
#include <bits/stdc++.h> using namespace std; #define ll long long int const N=105; int const mod=1e9+7; map<string,bool> vis; int main(){ int n; cin>>n; string s; getline(cin,s); for(int i=0;i<n;i++){ getline(cin,s); // cout<<s<<endl; vector<string> v; string t=""; for(int i=0;i<s.length();i++){ if(s[i]==' '){ v.push_back(t); t=""; } else t+=s[i]; } v.push_back(t); if(vis[v[0]]){ cout<<"greska"<<endl; continue; } bool b=1; for(int i=2;i<(v.size())-1;i++) if(vis[v[i]]==0) b=0; if(b==0){ cout<<"greska"<<endl; continue; } vis[v[0]]=1; cout<<"ok"<<endl; } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 360 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 360 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 0 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 | 1 ms | 436 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 360 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 0 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 | 1 ms | 436 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |
11 | Incorrect | 0 ms | 348 KB | Output isn't correct |
12 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 105 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |