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:哪位神仙帮帮忙,2105一直wa

Posted by amazingjxq at 2008-01-07 22:49:06
In Reply To:哪位神仙帮帮忙,2105一直wa Posted by:amazingjxq at 2008-01-05 16:34:30
> #include "iostream"
> #include "vector"
> using namespace std;
> using std::vector;
> int main()
> {
>     int n,pow,tmp=0;
> 	char bit;
> 	vector<int> res;
> 	cin>>n;
> 	for(int i=0;i!=n;i++){
> 		for(int count=0;count!=32;count++){
> 			if(count%8==0){
> 				if(count)res.push_back(tmp);
> 				pow=128;
> 				tmp=0;
> 			}
> 			cin>>bit;
> 			tmp+=(bit-48)*pow;
> 			pow/=2;
> 		}
> 		res.push_back(tmp);
> 	}
> 	for(vector<int>::size_type idx=0;idx!=res.size();idx++){
> 		cout<<res[idx]<<".";
> 		if((idx+1)%4==0)cout<<"\b \n";
> 	}
>     return 0;
> }
> 我机子上明明好好的,一提交就不行。咋就不对劲呢?
help!!

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