Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

8行搞定

Posted by miklcct at 2011-06-12 21:51:52 on Problem 3748 and last updated at 2011-06-12 21:54:58
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator