![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm(思维题)
题目
不会编程怎么行
fighting
展开
-
懒虫小鑫
懒虫小鑫 Time Limit: 1000 ms Memory Limit: 65536 KiB Submit Statistic Problem Description 小鑫是个大懒虫,但是这一天妈妈要小鑫去山上搬些矿石去城里卖以补贴家用。小鑫十分的不开心。不开心归不开心,小鑫还是要做这件事情的。 我们把这个事情简化一下。有n块矿石,设第i块矿石由两个数字wi和pi表示。分别表示这块石头的重量和...原创 2019-12-01 20:50:25 · 72 阅读 · 0 评论 -
分麻将(糖果)问题
#include<bits/stdc++.h> using namespace std; const int maxx=1e5+100; int a[maxx];//存放原数组 int b[maxx];//存放每个人的奖励 int main() { std::ios::sync_with_stdio(false); long long int n; cin&g...原创 2020-02-02 22:23:32 · 135 阅读 · 0 评论 -
Max Sum
#include<bits/stdc++.h> using namespace std; const int N=1e5+10; int a[N],dp[N]; int main() { int t,k=0; cin>>t; while(t--) { int n; cin>>n; ...原创 2020-02-04 18:18:40 · 128 阅读 · 0 评论 -
Division by 3
思路:找到规律,模3取余 1 0 0 1 0 0 1 0 0…(1不能被3整除,0能被3整除) 例1 0 0 1 0 0.1 0 0 。 。 。 。 a b 此时a=1,b=7,整除的个数为7-1-(7-1)/3个 a和b同时都在模3取余为1的位置上其有b-a-(b-a)/3个可以被3整除, 后面代码中利用sum计数,将a和b都移到最近的模3取余为1的位置上 #...原创 2020-02-04 20:30:50 · 177 阅读 · 0 评论 -
水果
#include<bits/stdc++.h> using namespace std; struct node { char fruit[110]; char where[110]; int num; }n[110]; int main() { int t; cin>>t; for(int e=0;e<t;e++) ...原创 2020-05-06 10:35:34 · 229 阅读 · 0 评论 -
Power Strings
Description Given two strings a and b we define ab to be their concatenation. For example, if a = “abc” and b = “def” then ab = “abcdef”. If we think of concatenation as multiplication, exponentiation...原创 2020-02-19 20:42:35 · 155 阅读 · 0 评论