| ||||||||||
| 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 | |||||||||
Re:哪位神仙帮帮忙,2105一直waIn 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator