Submission #837248

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8372482023-08-25 08:36:461075508020060209tcLove Polygon (BOI18_polygon)C++14
100 / 100
305 ms35540 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long
int n;
vector<int>e[200005];
vector<int>ee[200005];
int dgr[200005];
int alrd[200005];
int lve[200005];
int hs[200005];
void init(){
cin>>n;
int __id=0;
map<string,int>mp;
for(int i=1;i<=n;i++){
string s;
string t;
cin>>s>>t;
if(mp[s]==0){
mp[s]=++__id;
}
if(mp[t]==0){
mp[t]=++__id;
}
lve[mp[s]]=mp[t];
e[mp[s]].push_back(mp[t]);
// ee[mp[s]].push_back(mp[t]);
// ee[mp[t]].push_back(mp[s]);
dgr[mp[t]]++;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

polygon.cpp: In function 'void dfs(long long int, long long int)':
polygon.cpp:56:14: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   56 | for(int i=0;i<ee[nw].size();i++){
      |             ~^~~~~~~~~~~~~~
polygon.cpp: In function 'int main()':
polygon.cpp:96:18: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   96 |     for(int i=0;i<e[nw].size();i++){
      |                 ~^~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...