hihoCoder太阁最新面经算法竞赛5 register

Ended

Participants:118

Verdict:Accepted
Score:100 / 100
Submitted:2016-06-24 16:50:23

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <bits/stdc++.h>
using namespace std;
//Definition for an interval.
struct Interval {
    int start;
    int end;
    Interval() : start(0), end(0) {}
    Interval(int s, int e) : start(s), end(e) {}
};
template <typename T>
void ov(vector<T> &v){
  for(auto i = v.begin(); i != v.end(); i++)
    cout<<*i<<" ";
  cout<<endl;
}
int solve(){
  int t;cin>>t;
  for(int times = 0; times < t; times++){
    string s;cin>>s;
    int last0 = 0, last1 = 0;
    for(int i = 0; i < s.size(); i++){
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX