1263: 分东西 游戏中,一旦有人在比赛结束前退出游戏。剩下的人就可以支配离开者的物品。现在,玩家A离开游戏,留下了6种物品。玩家B和玩家C要分配玩家A的物品。假设玩家A的6种
原创 2022-09-07 11:38:50
27阅读
观察可得,最大的拆分方法是尽量拆成3,特殊的,如果最后剩下了1,那么就把3+1变成2+2 然后高精度计算即可 1 var s2,s3,i,n,l:longint; 2     a:array[0..5010] of longint; 3 4 procedure mul(x,m:longint); 5   var i,j,c,y:longint; 6   begin 7    
转载 2014-08-04 16:13:00
34阅读
2评论
末日传说Time Limit(Common/Java):1000MS/3000MS Memory Limit:65536KByteDescription
原创 2022-08-11 14:43:29
57阅读
水果Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2881    
水果Timede 3 #include 4 #include
原创 2022-03-18 14:22:22
45阅读
题干:
原创 2022-06-15 10:23:48
73阅读
观察样例,令f(n)表示n拆分的答案,猜想$f(n)=3f(n-3)$,当$n\le 4$时$f(n)=n$取3的原因是因为对于给定的$x+y$,当$4<x+y$,显然有$3^{x+y-3}$最大,否则直接取$x+y$即为最大值,也就是给出的递推式 1 #include<bits/stdc++.h>
转载 2019-11-11 17:54:00
61阅读
2评论
The Desire of AsunaTime Li
原创 2023-07-11 16:37:58
94阅读
一、内容二、思路三、代码#include <cstdio>#include <algorithm>#include <iostream>using namespace std;int n, a[3];int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) { sc...
原创 2021-08-27 14:23:12
527阅读
一、内容二、思路三、代码#include <cstdio>#include <algorithm>#include <iostream>using namespace std;int n, a[3];int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) { sc...
原创 2022-02-03 09:35:12
318阅读
一、内容The development of a text editor is a hard problem. You need to implement an extra module for brackets coloring in text.Your editor consists of a line with infinite length and cursor, which point...
原创 2022-01-06 17:53:15
140阅读
一、 内容On the well-known testing system MathForces, a draw of n rating units is arranged. The rating will be distributed according to the following algorithm: if k participants take part in this event,...
原创 2021-08-27 14:23:16
294阅读
一、内容A PIN code is a string that consists of exactly 4digits. Examples of possible PIN codes: 7013, 0000 and 0990. Please note that the PIN code can begin with any digit, even with 0.Polycarp has n(...
原创 2022-02-03 09:35:11
55阅读
一、 内容On the well-known testing system MathForces, a draw of n rating units is arranged. The rating will be distributed according to the following algorithm: if k participants take part in this event,...
原创 2022-02-03 09:35:11
230阅读
#include<iostream> #include<string> #include<map> using namespace std; //map<string,map<string,int>>这种比较新奇,解决了三个变量的键值对应 struct MyStruct { map <string, int>MyStruc...
原创 2022-03-10 17:52:45
70阅读
The Desire of Asuna Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Submit  Status ZYHAzwraith用自己心爱的键盘换来了很多支漂亮的荧光棒! 一天,他准备用一条由很多个莹光圈相互连接而成的荧光链送给女
原创 2023-04-19 16:51:25
66阅读
#include<iostream> #include<string> #include<map> using namespace std; //map<string,map<string,int>>这种比较新奇,解决了三个变量的键值对应 struct MyStruct { map <string, int>MyStruc...
原创 2021-07-13 14:57:18
60阅读
水果 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9855 Accepted Submission(s): 3934 Problem Des
原创 2021-07-15 15:29:33
78阅读
一、内容The development of a text editor is a hard problem. You need to implement an extra module for brackets coloring in text.Your editor consists of a line with infinite length and cursor, which point...
原创 2021-08-27 14:22:28
191阅读
一、内容A PIN code is a string that consists of exactly 4digits. Examples of possible PIN codes: 7013, 0000 and 0990. Please note that the PIN code can begin with any digit, even with 0.Polycarp has n(...
原创 2021-08-27 14:23:14
108阅读
  • 1
  • 2
  • 3
  • 4
  • 5