Backtracking: time complexity O(N!) Use HashMap to store the initial debts of each person, negative means the person sends money to others, positive m ...
分类:
其他好文 时间:
2017-11-08 13:17:47
阅读次数:
231
Farm Tour Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18150 Accepted: 7023 Description When FJ's friends visit him on the farm, he like ...
分类:
其他好文 时间:
2017-11-07 22:19:51
阅读次数:
205
此文为博主原创,转载...转载这种文章有意思吗qwq 严禁各OJ在未经博主同意的情况下擅自使用博文中的题面作为OJ题目。 今天是长者的测试www 感觉长者的题超棒的,部分分给得很足。(然而满分算法就QAQ) 上午【Friends】 遇见(1s) 题目大意:有n座楼,每座的高度为hi。你想在这些楼之间 ...
分类:
其他好文 时间:
2017-11-07 20:56:57
阅读次数:
250
Description Isabella and Steve are very good friends, and they often write letters to each other. They exchange funny experiences, talk about people a ...
分类:
其他好文 时间:
2017-11-06 20:11:11
阅读次数:
200
代码: 1 import itchat 2 import math 3 import PIL.Image as Image 4 import os 5 6 itchat.auto_login() 7 friends = itchat.get_friends(update=True)[0:] 8 us ...
分类:
微信 时间:
2017-11-05 15:08:09
阅读次数:
333
终末 【问题描述】 你是能看到第二题的 friends 呢。 ——laekov 没有尽头的世界之中,我们想知道0 ? 中有多少个数在 进制下和? 进制下的表示方式一样。(举个例子,4的?3进制表示为4 = 121?3 = 1 × (?3)2 + 2 × (?3)1 + 1 × (?3)0) 【输入格 ...
分类:
其他好文 时间:
2017-11-01 01:12:51
阅读次数:
180
T1 星空【问题描述】你是能看到第一题的friends 呢。——hja点点星空是一张𝑁 × 𝑀的棋盘,左下角有颗星星。尤和千每次可以将星星向右边、右上、上边移动一格。尤和千轮流移动,尤先手,问尤是否必胜?【输入格式】多组数据,每行两个整数𝑁, 𝑀,当𝑁 = 𝑀 = 0时数据停止。【输出格 ...
分类:
其他好文 时间:
2017-10-30 11:26:01
阅读次数:
293
T1 洗澡【问题描述】你是能看到第一题的friends 呢。——hja洗澡的地方,有一段括号序列,将一个括号修改一次需要1的代价(将左括号变成右括号或者相反),求最小代价使得括号序列合法。【输入格式】一行一个括号序列。【输出格式】一行一个整数代表答案。【样例输入】())(【样例输出】2【数据范围与规 ...
分类:
其他好文 时间:
2017-10-29 16:49:34
阅读次数:
253
LsF is visiting a local amusement park with his friends, and a mirror room successfully attracts his attention. Inside the mirror room, there are n pl ...
分类:
其他好文 时间:
2017-10-23 20:50:58
阅读次数:
208
A. Trip For Meal Winnie-the-Pooh likes honey very much! That is why he decided to visit his friends. Winnie has got three best friends: Rabbit, Owl an ...
分类:
其他好文 时间:
2017-10-18 00:21:45
阅读次数:
163