http://noi.openjudge.cn/ch0405/191/ http://poj.org/problem?id=1189 一开始忘了\(2^{50}\)没超long long差点写高精度QvQ 很基础的dp,我先假设有\(2^n\)个球,分开时就分一半,这样每次都能除开. #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long
http://noi.openjudge.cn/ch0405/1665/?lang=zh_CN 状压水题,手动转移 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int in() { int k = 0, fh = 1; char c = getchar(); for(; c < '0' || c > '9'; c = getchar()) if (c
本文使用winform实现简单的石头剪刀布的游戏,主要实现,电脑随机出拳,玩家手动点击出拳:实现简易背景图片3秒切换:简易统计信息. 1.效果图 2.实现代码 新建一个windows窗体程序,用数字1代表石头,用数字2代表剪刀,用数字3代表布,结果取玩家和电脑出拳之差,有三种结果 玩家赢: -1,2 平手: 0 玩家输: 其它值 新建3个类: 1)Computer.cs 电脑随机出拳 using System; using System.Collections.Generic; using Sy