标签:fine c++ mes pac type ret div 随机 mod
1 #include <bits/stdc++.h> 2 #define _for(i,a,b) for(int i = (a);i < b;i ++) 3 #define _rep(i,a,b) for(int i = (a);i > b;i --) 4 #define INF 0x3f3f3f3f 5 #define MOD 1000000007 6 typedef long long ll; 7 using namespace std; 8 9 int Myrand(int l,int r) 10 { 11 int num1 = rand() % r + 1; 12 int num2 = rand() % r + 1; 13 return num1-num2!=0?num1-num2:1; 14 } 15 int main() 16 { 17 freopen("creator3.in","w+",stdout); 18 srand(time(0)); 19 int N = 12; 20 printf("%d\n",N); 21 _for(i,0,N-1) 22 printf("%d ",Myrand(-39,39)); 23 printf("%d\n",Myrand(-39,39)); 24 return 0; 25 }
标签:fine c++ mes pac type ret div 随机 mod
原文地址:https://www.cnblogs.com/Asurudo/p/11421469.html