Skip to content

Instantly share code, notes, and snippets.

@iloahz
Created September 6, 2012 05:20
Show Gist options
  • Save iloahz/3651609 to your computer and use it in GitHub Desktop.
Save iloahz/3651609 to your computer and use it in GitHub Desktop.
Data Maker for SGU 132 Another Chocolate Maniac by iloahz@Attiix
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int MAXN = 71;
const int MAXS = 1 << 7;
int main(){
#ifdef ATTIIX
freopen("sgu132.in", "w", stdout);
#endif
int T = 1000;
while (T--){
int m = rand() % 70 + 1;
int n = rand() % 7 + 1;
printf("%d %d\n", m, n);
for (int i = 0;i < m;i++){
for (int j = 0;j < n;j++){
if (rand() % 3) printf(".");
else printf("*");
}
printf("\n");
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment