细节错误和常犯错误
Fearain
一点浩然正气,千里快哉风。
展开
-
Hangover poj1003
#includeusing namespace std;int main(){ while (1) { float len; cin>>len; if (len == 0) return 0; float cl = 0; int原创 2015-11-23 18:20:51 · 551 阅读 · 0 评论 -
HDU 2092
有二个整数,它们加起来等于某个整数,乘起来又等于另一个整数,这种整数到底存不存在?输入数据为成对出现的整数n,m(-10000只需要对于每个n和m,输出“Yes”或者“No”,明确有还是没有这种整数就行了。#include#includeint main(){ int a, b; while (~scanf("%d%d", &a, &b)) // 写原创 2015-12-13 10:52:15 · 563 阅读 · 0 评论 -
hdu 1548 A strange lift
#include#include#includeusing namespace std;typedef struct Node{ int cf, stp;}Node;int main(){ int n, a, b, k[202], ans, vid[202]; while (cin>>n, n) { cin>>a>>b;原创 2016-11-20 15:40:12 · 337 阅读 · 0 评论 -
hdu 1203 I NEED A OFFER!
#include#include#include#include#include#define min(x, y) (x) < (y) ? (x) : (y)using namespace std; int n, m, a[10002]; double b[10002]; double dp[10002];int main(){ while (c原创 2016-11-21 13:39:06 · 293 阅读 · 0 评论 -
poj 3641 Pseudoprime numbers
#include #include #include #include #include using namespace std;typedef long long int ll;//好吧,这次是因为没有使用long long。。。。ll mod_pow(ll x, ll n, ll mod){ ll res = 1; while (n > 0) {原创 2016-11-26 18:24:12 · 371 阅读 · 0 评论 -
hdu 2845 Beans
#include#include#includeusing namespace std;//很多二维的问题能够分解成两个一维的问题int x[200002], y[200002];int main(){ int n, m, a; while (cin>>n>>m) { //顺手就写成了(cin>>n>>m,n|m)然后就TLE了。。。&_&原创 2016-11-27 10:01:35 · 292 阅读 · 0 评论