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

相关文章:

  • 2021-08-06
  • 2021-06-19
  • 2021-12-01
  • 2022-01-31
  • 2021-09-04
  • 2021-10-18
  • 2021-12-04
  • 2022-12-23
猜你喜欢
  • 2021-09-30
  • 2021-09-30
  • 2021-09-30
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
  • 2021-09-30
相关资源
相似解决方案