随笔分类 -  c++-stl

摘要:Polycarp is working on a new operating system called BerOS. He asks you to help with implementation of a file suggestion feature. There are n files on 阅读全文
posted @ 2018-10-22 10:59 左手边五十米 阅读(257) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #define N 10000 7 using namespace std; 8 struct EDGE 9 { 10 int to;//终点 11 int cost;//边的权值 12 }; 13 vectorG[N];//G[i]中i表示出发点 ... 阅读全文
posted @ 2018-10-11 19:02 左手边五十米 阅读(1838) 评论(0) 推荐(2)
摘要:Polycarp has nn coins, the value of the i-th coin is aiai . It is guaranteed that all the values are integer powers of 22 (i.e. ai=2dai=2d for some no 阅读全文
posted @ 2018-07-29 13:17 左手边五十米 阅读(351) 评论(0) 推荐(0)
摘要:You are given an array a consisting of n integers a1, ..., an. In one operation, you can choose 2 elements ai and aj in which ai is divisible by aj an 阅读全文
posted @ 2018-07-29 07:25 左手边五十米 阅读(280) 评论(0) 推荐(0)