The Balance http://poj.org/problem?id=2142 Time Limit: 5000MS Memory Limit: 65536K Description Ms. Iyo Kiffa-Australis has a balance and only two kinds of weights to measure a dose of medicine. For example, to measure 200mg of aspirin using 3…
嗯... 题目链接:http://poj.org/problem?id=2142 AC代码: #include<cstdio> #include<iostream> using namespace std; inline int _abs(int x){ ) return -x; return x; } inline void exgcd(int a, int b, int &g, int &x, int &y){ ; y = ;} else { exgcd…
#include <cstdio> #include <algorithm> #include <cstring> #include <iostream> using namespace std; int a,b,c; int exgcd(int a,int b,int &x,int &y){ ){ x = ; y = ; return a; } int d = exgcd(b,a%b,x,y); int temp = x; x = y; y…