文章

20

粉丝

0

获赞

70

访问

2.9k

头像
日期累加 题解:
P1446 北京理工大学机试题
发布于2026年3月14日 15:12
阅读数 86

#include<bits/stdc++.h>
using namespace std;

vector<int> year;
vector<int> month;
vector<int> day;
vector<int> dd;

int main(){
    int n, y, m, d, ds;
    int mtod[] = {0,
        31, 28, 31, 30, 
        31, 30, 31, 31,
        30, 31, 30, 31,
    };
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> y >> m >> d >> ds;
        year.push_back(y);
        month.push_back(m);
        day.push_back(d);
        dd.push_back(ds);
    }
    
    for(int i = 0; i < n; i++){
        y = year[i];
 ...

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发