hihoCoder挑战赛32

Rikka with Sequence V

构造

#pragma comment(linker, "/STACK:102400000,102400000")
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<vector>
#include<algorithm>
#include<iostream>
#include<map>
#include<queue>
#include<stack>
#include<string>
#include<functional>
//#include<bits/stdc++.h>
using namespace std;
typedef long long lint;



int cmp(const void * x, const void * y) {
#define datatype int
    datatype dx = *((datatype *)(x)), dy = *((datatype *)(y));
    //x < y
    return dx > dy ? 1 : -1;
#undef datatype
}

lint dp[1005][1005];
const int mod = 1000000007;

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
#endif
    std::ios::sync_with_stdio(0), cin.tie(0);
    int n;
    cin >> n;
    for (int i = 1; i <= n; i += 2) cout << i << ' ';
    for (int i = n - n % 2; i > 0; i -= 2) cout << i << ' ';
    return 0;
}
View Code

Rikka with String II

Rikka with Function

Rikka with String III

原文地址:https://www.cnblogs.com/dramstadt/p/7968352.html