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

Re:贴个代码,一次ac

Posted by Acaini at 2010-03-25 15:46:26 on Problem 3748
In Reply To:贴个代码,一次ac Posted by:youwang at 2010-03-24 10:06:53
> #include <stdio.h>
> 
> #define setbit(x,y) x|=(1<<(y)) //将X的第Y位置1
> #define clrbit(x,y) x&=~(1<<(y)) //将X的第Y位清0
> 
> 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;
> }

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