제출 #300075

#제출 시각아이디문제언어결과실행 시간메모리
300075theshadow_04Utrka (COCI14_utrka)C++14
80 / 80
240 ms14712 KiB
// VU TRUONG AN #include <bits/stdc++.h> #define F first #define S second #define MOD 1000000007 #define pb push_back #define bit(x,p) ((x>>p) & 1) #define ll long long #define Task "UTRKA" using namespace std; const int base = 100003; const int maxn = 100005; string s[maxn]; int n; map<string,int> M; int main(){ ios_base::sync_with_stdio(0); cout.tie(0); cin.tie(0); if(fopen(Task".inp","r")){ freopen(Task".inp","r",stdin); freopen(Task".out","w",stdout); } cin >> n; for(int i = 1;i <= n;++i) cin >> s[i]; for(int i = 1;i < n;++i){ string a; cin >> a; M[a] ++; } for(int i = 1;i <= n;++i){ if(!M[s[i]]){ cout << s[i]; return 0; } M[s[i]]--; } }

컴파일 시 표준 에러 (stderr) 메시지

utrka.cpp: In function 'int main()':
utrka.cpp:23:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   23 |   freopen(Task".inp","r",stdin);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
utrka.cpp:24:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   24 |   freopen(Task".out","w",stdout);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...