zoukankan      html  css  js  c++  java
  • 对拍模板

    ①生成整数的对拍文件,每次生成10个数字。共生成十种 且数字范围在100内

    //看看会不会爆int!数组会不会少了一维!
    //取物问题一定要小心先手胜利的条件
    #include <bits/stdc++.h>
    using namespace std;
    #pragma comment(linker,"/STACK:102400000,102400000")
    #define LL long long
    #define ALL(a) a.begin(), a.end()
    #define pb push_back
    #define mk make_pair
    #define fi first
    #define se second
    #define haha printf("haha
    ")
    const int maxn = 10;
    LL h[maxn];
    
    int main(){
        ///freopen( ".in","r",stdin );
        freopen( "input","w",stdout );
        srand( time( NULL ) );
        int t,n = 10 ;
        while( n-- ){
            printf("10
    ");
            for (int i = 1; i <= 10; i++)
                printf("%d
    ",abs(rand()) % 100 );
        }
        return 0;
    }
    View Code

    ②生成随机小数

    //看看会不会爆int!数组会不会少了一维!
    //取物问题一定要小心先手胜利的条件
    #include <bits/stdc++.h>
    using namespace std;
    #pragma comment(linker,"/STACK:102400000,102400000")
    #define LL long long
    #define ALL(a) a.begin(), a.end()
    #define pb push_back
    #define mk make_pair
    #define fi first
    #define se second
    #define haha printf("haha
    ")
    const int maxn = 10;
    LL h[maxn];
    
    int main(){
        ///freopen( ".in","r",stdin );
        freopen( "input","w",stdout );
        srand( time( NULL ) );
        int t,n = 10 ;
        while( n-- ){
            printf("10
    ");
            for (int i = 1; i <= 10; i++)
                 printf( "%.6lf
    ",rand()*1.0 / 100 );
        }
        return 0;
    }
    View Code

    ③生成字符

    //看看会不会爆int!数组会不会少了一维!
    //取物问题一定要小心先手胜利的条件
    #include <bits/stdc++.h>
    using namespace std;
    #pragma comment(linker,"/STACK:102400000,102400000")
    #define LL long long
    #define ALL(a) a.begin(), a.end()
    #define pb push_back
    #define mk make_pair
    #define fi first
    #define se second
    #define haha printf("haha
    ")
    const int maxn = 10;
    LL h[maxn];
    
    int main(){
        ///freopen( ".in","r",stdin );
        freopen( "input","w",stdout );
        srand( time( NULL ) );
        int t,n = 10 ;
        while( n-- ){
            printf("10
    ");
            for (int i = 1; i <= 10; i++)
                printf( "%c
    ",rand() % 26 + 'A' );
        }
        return 0;
    }
    View Code
  • 相关阅读:
    LINUX 逻辑地址、线性地址、物理地址和虚拟地址 转
    Linux开机执行顺序
    Linux内核分析笔记 与Linux内核开发理论
    理解Linux系统中的load average(图文版)转
    Linux文件空洞与稀疏文件 转
    Linux中断(interrupt)子系统之一:中断系统基本原理 (图解)
    LINUX 内存结构
    LINUX 数据结构 &算法 网络协议 & 网络编程 多任务编程
    IO端口和IO内存的区别 转
    Linux内核高端内存 转
  • 原文地址:https://www.cnblogs.com/heimao5027/p/6104212.html
Copyright © 2011-2022 走看看