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

分享

Posted by xiaobei1a2b3c at 2014-04-29 12:36:57 on Problem 3748
#include <iostream>
#include <cstdio>

using namespace std;

int main() {
	unsigned int r, x, y;

	while(scanf("%x,%d,%d", &r, &x, &y) == 3) {
		r &= ~(1<<x);
		r &= ~(7<<(y-2));
		r |= (6<<(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