#include<bits/stdc++.h>
#define int long long
using namespace std;
int n = 0;
int times[200001];
bool cmp(int x,int y)
{
return x < y;
}
struct Time{
int y;
int m;
int d;
int h;
int c;
string tmp;
}start,goal;
signed main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cin >> n;
for(int i = 1;i <= n;++ i)
cin >> times[i];
sort(times + 1,times + n + 1,cmp);
cin >> start.tmp;
cin >> goal.tmp;
sscanf(start.tmp,"%d-%d-%d-%d:%d",&start.y,&start.m,&start.d,&start.h,&start.c);
sscanf(goal.tmp,"%d-%d-%d-%d:%d",&goal.y,&goal.m,&goal.d,&goal.h,&goal.c);
return 0;
}
还没写完,但是CE了,
29 80 C:\Users\Administrator\Documents\P1167.cpp [Error] cannot convert 'std::string {aka std::basic_string}' to 'const char*' for argument '1' to 'int sscanf(const char*, const char*, ...)'