| ||||||||||
| 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 | |||||||||
8行搞定In Reply To:这题出的真叫。。。~~ Posted by:0912080007 at 2010-01-07 10:24:38 > 不停的wa,最后不到10行代码搞定
8行(不計空行為7行)
這是我目前為止除了1000題以外最短的AC代碼
#include <stdio.h>
int main(void) {
unsigned r, x, y;
scanf("%x,%u,%u", &r, &x, &y);
printf("%x\n", (r & ~(1u << x) & ~(1u << y - 2)) | 3u << y - 1);
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator