栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

缺省源(没必要为了适应xcpc而用devc++)

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

缺省源(没必要为了适应xcpc而用devc++)

#include 
#define pii pair
#define x first
#define y second
#define dbg(x) cout << #x << "===" << x << endl;
#define T_void         
    template  
    void
T_void read(T &x) {
    T res = 0, f = 1;
    char c = getchar();
    while (!isdigit(c)) {
        if (c == '-') f = -1;
        c = getchar();
    }
    while (isdigit(c)) res = (res << 3) + (res << 1) + (c - '0'), c = getchar();
    x = res * f;
}
T_void OUT(T x) {
    if (x < 0) putchar('-'), x = -x;
    if (x > 9) OUT(x / 10);
    putchar(x % 10 + '0');
}
T_void print(T a, char c) { OUT(a), putchar(c); }

// #define pragma GCC optimize(2)
// #define int long long
#define ll long long
using namespace std;
const int N = 1e5 + 5;
const int mod = 1e9 + 7;

int n, a[N];
void solve() {
    read(n);
    for (int i = 1; i <= n; i++) read(a[i]);
    for (int i = 1; i <= n; i++) print(a[i] * a[i], ' ');
}
signed main() {
    int T = 1;
    // read(T);
    while (T--) {
        solve();
    }
    return 0;
}


// // 求组合数
// int re[N], inv[N], fac[N];
// void init(int n) {
//     re[0] = inv[1] = fac[0] = re[1] = fac[1] = 1;
//     for (int i = 2; i <= n; ++i) {
//         fac[i] = fac[i - 1] * i % mod;
//         inv[i] = (mod - mod / i) * inv[mod % i] % mod;
//         re[i] = re[i - 1] * inv[i] % mod;
//     }
// }
// int C(int a, int b) { return fac[a] * re[b] % mod * re[a - b] % mod; }
// // 逆元
// int inv(int x) { return (x == 1) ? 1 : (mod - mod / x) * inv(mod & x) % mod;
// }
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/290484.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号