アットウィキロゴ

SKE76

import 'dart:html';
 
int number;
List<String> post=new List<String>(22);   
List<int> life=new List<int>(100);  
List<int> car=new List<int>(100); 
List<int> age=new List<int>(100); 
List<int> data=new List<int>(1000); 
 
void main() {
 
  int s,a1,p1,sx;
 
 faststep sub=new faststep();
 sub.makedata();
 post=sub.post;
 life=sub.life;
 car=sub.car;
 age=sub.age;
 
 number=21;
 
 int t;
 
 for(t=1;t<7;t++){
 
 game sub2=new game();
 sub2.life=life;
 sub2.age=age;
 sub2.car=car;
 sub2.number=number;
 sub2.makedata();
 life=sub2.life;
 car=sub2.car;
 age=sub2.age;
 number=sub2.number;
 
for(s=1;s<number+1;s++){
stock sub3=new stock();
sub3.data=data;
sx=age[s]; 
p1=car[s];
if(life[s]>50)sub3.setdata(s,sx,p1);
}
 
 print(number);
 
 }
 
 
 
 
 
 
}
 
class stock{
 
List<int> data=new List<int>(1000);   
 
int getnumber(int s,int sx){
int n1;
n1=10*s+sx;    
return n1;
}
 
void setdata(int s,int sx,int d){
int n1;
n1=getnumber(s,sx);
data[n1]=d;
}
 
int getdata(int s,int sx){
int n1,d1;
n1=getnumber(s,sx);
d1=data[n1];
return d1;
}
}
 
class select{ 
 
  int number;
  List<String> post=new List<String>(22);   
  List<int> life=new List<int>(100);  
  List<int> car=new List<int>(100); 
  List<int> age=new List<int>(100); 
  List<int> pre=new List<int>(100); 
 
  void makedata(){
  int s,p1;
 
  for(s=1;s<number+1;s++){
    pre[s]=0;  
  }
 
  for(p1=1;p1<16;p1++){
  point(p1);  
  }
 
  }
 
 
  void point(int p1){ 
 
    int s,sx,z,sxs;
    List<int> subx=new List<int>(100);   
    int subnumber;
    int maxnumber;
 
    sx=0;
    for(s=1;s<number+1;s++){
      z=0;
      if(life[s]>50)z=z+1;
      if(pre[s]==0)z=z+1;
      if(z==2)sx=sx+1;
      if(z==2)subx[sx]=s;
    }  
    subnumber=sx;
    maxnumber=999;
    sxs=0;
    for(s=1;s<subnumber+1;s++){
      sx=subx[s];
      if(car[sx]<maxnumber)sxs=sx;
      if(car[sx]<maxnumber)maxnumber=car[sx];
    } 
 
    pre[sxs]=p1;   
  }
 
 
 
}
 
class game{
 
int number;    
List<int> life=new List<int>(100);  
List<int> car=new List<int>(100); 
List<int> age=new List<int>(100); 
List<int> pre=new List<int>(100); 
 
void makedata(){
 
  int a1,p1,s;
 
  for(a1=1;a1<7;a1++){
    death(a1);
  }
 
 
  select sub2=new select();
  sub2.life=life;
  sub2.car=car;
  sub2.age=age;
  sub2.number=number;
  sub2.makedata();
  pre=sub2.pre;
 
 
  fresh();
 
  move();  
 
 
}
 
void move(){
 
  int s;
 
for(s=1;s<number+1;s++){  
if(life[s]>50)car[s]=pre[s];  
 
}
for(s=1;s<number+1;s++){  
age[s]=age[s]+1;  
}
 
}
void fresh(){
 
int s;
 
for(s=1;s<7;s++){  
pre[s+number]=15+s;
life[s+number]=100;
age[s+number]=0;
}
 
number=number+6;
 
}
 
 
 
void death(int a1){
int s,sx,z,sxs;
List<int> subx=new List<int>(100);   
int subnumber;
int maxnumber;
 
sx=0;
for(s=1;s<number+1;s++){
z=0;
if(life[s]>50)z=z+1;
if(age[s]==a1)z=z+1;
if(z==2)sx=sx+1;
if(z==2)subx[sx]=s;
}
subnumber=sx;
maxnumber=0;
sxs=0;
for(s=1;s<subnumber+1;s++){
sx=subx[s];
if(car[sx]>maxnumber)sxs=sx;
if(car[sx]>maxnumber)maxnumber=car[sx];
}
life[sxs]=0;
 
}
 
}
 
 
class faststep{
 
List<String> post=new List<String>(100);  
List<int> life=new List<int>(100); 
List<int> car=new List<int>(100); 
List<int> age=new List<int>(100); 
 
 
int s,sx,tx;
 
void makedata(){  
 
  for(s=1;s<22;s++){
    life[s]=100;
  }
 
  for(s=1;s<22;s++){
    car[s]=s;
  }
  tx=0;
  for(s=1;s<7;s++){
    for(sx=1;sx<s+1;sx++){
    tx=tx+1;
  age[tx]=7-s;
  }
  }
 
 
  post[0]="引退";
  post[1]="首相";
  post[2]="幹事長";
  post[3]="総務会長";
  post[4]="政調会長";
  post[5]="国対委員長";
  post[6]="幹事代理";
  post[7]="総務代理";
  post[8]="政調代理";
  post[9]="国対代理";
  post[10]="幹事";
  post[11]="幹事";
  post[12]="幹事";
  post[13]="総務";
  post[14]="総務";
  post[15]="総務";
  post[16]="部会";
  post[17]="部会";
  post[18]="部会";
  post[19]="国対";
  post[20]="国対";
  post[21]="国対";
 
}  
}
最終更新:2013年11月21日 15:06