摘要: 高精加 #include<iostream> #include<vector> #include<algorithm> using namespace std; int check(vector<int> &a){ int l = 0, r = a.size() - 1; while(l < r){ 阅读全文
posted @ 2020-08-03 22:32 yys_c 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 5 * 5 方阵,二进制枚举第一行的开关情况,后一行的开关情况由上一行的灯的亮暗情况决定,最后特判一下最后一行。所有开关次数取最小值,最后检查一下开关次数是否大于6就行了。 #include<iostream> #include<cstring> using namespace std; const 阅读全文
posted @ 2020-08-03 21:50 yys_c 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Description Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows 阅读全文
posted @ 2020-08-03 21:31 yys_c 阅读(84) 评论(0) 推荐(0) 编辑
摘要: Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 2469135 阅读全文
posted @ 2020-08-03 18:06 yys_c 阅读(138) 评论(0) 推荐(0) 编辑