CodePudding user response:
有点难度CodePudding user response:
ListList
The Random rd=new Random ();
for (int i=0; i <365; I++)
{
DateTime date=DateTime. Now. AddDays (I);
Int day=(int) date. DayOfWeek;
If (day==1)
{
//A watch
}
Else if (day & gt; 1 & amp; & Day & lt; 6)
{
If (usersTemp. Count==0)
{
UsersTemp. AddRange (users);
}
//get a random number
Int n=rd. Next (0, usersTemp. Count - 1);
//get the watch
String user=usersTemp [n].
//remove have typography
UsersTemp. RemoveAt (n);
}
}
CodePudding user response:
Since the ceiling for a year so not much dataDirectly generated data array to remove 365 days on Monday for scheduling in merge sort through time
done
CodePudding user response:
Public static void (aa){
List
List
List
Bool isOne=true;
for (int i=0; i <365; I++)
{
DateTime date=DateTime. Now. AddDays (I);
Int day=(int) date. DayOfWeek;
If (day==1)
{
//A watch
UsersTemp. Add (" a ");
//the first after the first of the values in the array the back
if (! IsOne)
{
String value=https://bbs.csdn.net/topics/users [0];
Users. The RemoveAt (0);
Users. The Add (value);
}
}
Else if (day & gt; 1 & amp; & Day & lt; 6)
{
IsOne=false;
String value=https://bbs.csdn.net/topics/users [0];
UsersTemp. Add (the users/day - 2);
}
}
}