861D - Polycarp's phone book 思路:用map做的话,只能出现一次循环,否则会超时. 代码: #include<bits/stdc++.h> using namespace std; #define f first #define s second #define pb push_back #define mp make_pair map<string,int> ma; ]; int main(){ int n; string s,nu; cin>&…
C. Polycarp at the Radio time limit per test: 2 seconds memory limit per test: 256 megabytes input: standard input output: standard output Polycarp is a music editor at the radio station. He received a playlist for tomorrow, that can be represented a…
Description Polycarp is a music editor at the radio station. He received a playlist for tomorrow, that can be represented as a sequence a1, a2, ..., an, where ai is a band, which performs the i-th song. Polycarp likes bands with the numbers from 1 to…
Description Polycarp loves lowercase letters and dislikes uppercase ones. Once he got a string s consisting only of lowercase and uppercase Latin letters. Let A be a set of positions in the string. Let's call it pretty if following conditions are met…
D. Polycarp's Picture Gallery time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Polycarp loves not only to take pictures, but also to show his photos to friends. On his personal website he h…