#include #include #include #include #include #include #include using namespace std; #define BOGOSITY #ifdef _MSC_VER typedef unsigned __int64 uint64_t; typedef unsigned __int32 uint32_t; #endif typedef uint32_t ui; ui n; // number of machines ui cd(ui x,ui y) { return (n+y-x)%n; } ui acd(ui x,ui y) { return (n+x-y)%n; } ui ad(ui x,ui y) { return min(cd(x,y),acd(x,y)); } ui lcd,lacd,lad; ui bitcount(ui x) { ui r = 0; for(int i = 0; i <= 31; i++) { if(x & (1<> k; cin >> x >> y; n = 1< %lu", pos);*/ \ dest++; \ } \ /* printf("\n");*/ \ } while(0); testrun(cd,lcd); testrun(acd,lacd); testrun(ad,lad); // I don't buy this at all #ifdef BOGOSITY lcd = bitcount(cd(x,y)); lacd = bitcount(acd(x,y)); #endif cout << lcd << " " << lacd << " " << lad << endl; } int main() { while(cin) { string s; cin >> s; if(s.empty()) continue; process(s); } return 0; }