Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
这个测试数据怎么感觉有点错啊!#include <stdio.h> #define setbit(x,y) x|=(1<<(y)) #define clrbit(x,y) x&=~(1<<(y)) int main() { int r, x, y; scanf("%x,%d,%d", &r, &x, &y); clrbit(r, x); setbit(r, y); setbit(r, y - 1); clrbit(r, y - 2); printf("%x\n", r); return 0; } 这个程序,我用题目中给出的数据来测试,答案跟上面的不一样,这个答案只能显示4位,可为什么提交上去是对的啊??为什么??我自已写的程序,跟答案是对的,可为什么会不成功呢? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator