亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? prob_c.html

?? acm大賽題
?? HTML
字號:
<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.03 [zhcn] (Win95; I) [Netscape]">
   <TITLE>1991 ACM Finals, Problem C - Concurrency Simulator</TITLE>
<!SGML "ISO 8879:1986">
<LINK HREF="mailto:karree46@sol.acs.uwosh.edu" REV=made>
</HEAD>
<BODY BGCOLOR="#FFFFFF">

<HR NOSHADE>
<CENTER>
<H2>
<I>1991 ACM Scholastic Programming Contest Finals</I></H2></CENTER>

<CENTER>
<H4>
<I>sponsored by AT&amp;T Computer Systems</I></H4></CENTER>

<CENTER>
<H2>
Problem C<BR>
Concurrency Simulator</H2></CENTER>
Programs executed concurrently on a uniprocessor system appear to be executed
at the same time, but in reality the single CPU alternates between the
programs, executing some number of instructions from each program before
switching to the next. You are to simulate the concurrent execution of
up to ten programs on such a system and determine the output that they
will produce.

<P>The program that is currently being executed is said to be <I>running</I>,
while all programs awaiting execution are said to be <I>ready</I>. A program
consists of a sequence of no more than 25 statements, one per line, followed
by an end statement. The statements available are listed below.
<PRE><B>Statement Type</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <B>Syntax
</B>--------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ------
Assignment&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <I>variable</I> = <I>constant</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Output&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <B>print</B> <I>variable
</I>Begin Mutual Exclusion&nbsp; <B>lock
</B>End Mutual Exclusion&nbsp;&nbsp;&nbsp; <B>unlock
</B>Stop Execution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <B>end</B></PRE>
A <I>variable</I> is any single lowercase alphabetic character and a <I>constant</I>
is an unsigned decimal number less than 100. There are only 26 variables
in the computer system, and they are shared among the programs. Thus assignments
to a variable in one program affect the value that might be printed by
a different program. All variables are initially set to zero.

<P>Each statement requires an integral number of time units to execute.
The running program is permitted to continue executing instructions for
a period of time called its <I>quantum</I>. When a program's time quantum
expires, another ready program will be selected to run. Any instruction
currently being executed when the time quantum expires will be allowed
to complete.

<P>Programs are queued first-in-first-out for execution in a <I>ready queue</I>.
The initial order of the ready queue corresponds to the original order
of the programs in the input file. This order can change, however, as a
result of the execution of <B>lock</B> and <B>unlock</B> statements.

<P>The <B>lock</B> and <B>unlock</B> statements are used whenever a program
wishes to claim mutually exclusive access to the variables it is manipulating.
These statements always occur in pairs, bracketing one or more other statements.
A <B>lock</B> will always precede an <B>unlock</B>, and these statements
will never be nested. Once a program successfully executes a <B>lock</B>
statement, no other program may successfully execute a <B>lock</B> statement
until the locking program runs and executes the corresponding <B>unlock</B>
statement. Should a running program attempt to execute a <B>lock</B> while
one is already in effect, this program will be placed at the end of the
<I>blocked queue</I>. Programs blocked in this fashion lose any of their
current time quantum remaining. When an <B>unlock</B> is executed, any
program at the head of the blocked queue is moved to the head of the ready
queue. The first statement this program will execute when it runs will
be the <B>lock</B> statement that previously failed. Note that it is up
to the programs involved to enforce the mutual exclusion protocol through
correct usage of <B>lock</B> and <B>unlock</B> statements. (A renegade
program with no <B>lock</B>/<B>unlock</B> pair could alter any variables
it wished, despite the proper use of <B>lock</B>/<B>unlock</B> by the other
programs.)
<H3>
Input and Output</H3>
The first line of the input file consists of seven integers separated by
spaces. These integers specify (in order): the number of programs which
follow, the unit execution times for each of the five statements (in the
order given above), and the number of time units comprising the time quantum.
The remainder of the input consists of the programs, which are correctly
formed from statements according to the rules described above.

<P>All program statements begin in the first column of a line. Blanks appearing
in a statement should be ignored. Associated with each program is an identification
number based upon its location in the input data (the first program has
ID = 1, the second has ID = 2, etc.).

<P>Your output will contain of the output generated by the print statements
as they occur during the simulation. When a print statement is executed,
your program should display the program ID, a colon, a space, and the value
of the selected variable. Output from separate print statements should
appear on separate lines. A sample input and correct output are shown below.
<H3>
Sample Input</H3>

<PRE>3 1 1 1 1 1 1
a = 4
print a
lock
b = 9
print b
unlock
print b
end
a = 3
print a
lock
b = 8
print b&nbsp;
unlock
print b
end
b = 5
a = 17
print a
print b
lock
b = 21
print b
unlock
print b
end</PRE>

<H3>
Sample Output</H3>

<PRE>1: 3
2: 3
3: 17
3: 9
1: 9
1: 9
2: 8
2: 8
3: 21
3: 21</PRE>

<HR NOSHADE>
</BODY>
</HTML>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品福利电影一区二区三区四区| 欧美成人精品1314www| 亚洲精品成人悠悠色影视| 在线免费观看成人短视频| 偷拍自拍另类欧美| 国产三级欧美三级日产三级99 | 九一九一国产精品| 国产日韩欧美精品一区| 欧美三级中文字幕在线观看| 久久成人久久爱| 日韩理论片一区二区| 欧美一区二区网站| 97精品久久久久中文字幕| 天天射综合影视| 亚洲日本一区二区| 亚洲精品一区二区三区蜜桃下载 | 欧美色男人天堂| 国产一区二区三区免费观看| 亚洲一区二区三区中文字幕| 久久久久久久精| 欧美人伦禁忌dvd放荡欲情| 成人一二三区视频| 日韩中文字幕av电影| 亚洲欧美激情视频在线观看一区二区三区 | 26uuu国产一区二区三区| 91在线精品秘密一区二区| 精品影视av免费| 亚洲国产美国国产综合一区二区| 久久午夜色播影院免费高清| 色偷偷久久一区二区三区| 国产成人免费av在线| 免费观看在线综合| 亚洲国产人成综合网站| 亚洲免费成人av| 国产精品美女久久久久久2018| 精品福利在线导航| 欧美日韩亚洲综合一区| 成人av集中营| 成人污污视频在线观看| 日韩黄色在线观看| 一区二区中文字幕在线| 日韩精品一区二区在线观看| 色呦呦一区二区三区| av在线不卡电影| 国产精品资源在线| 久久97超碰色| 久久99国产精品麻豆| 麻豆精品一二三| 奇米在线7777在线精品| 日本中文字幕不卡| 蜜臀av一区二区在线免费观看 | 欧美撒尿777hd撒尿| 色就色 综合激情| 91天堂素人约啪| 一本久久a久久免费精品不卡| 成人不卡免费av| av在线不卡免费看| 91毛片在线观看| 欧美伊人久久久久久午夜久久久久| 色一区在线观看| 欧美性高清videossexo| 欧美久久一区二区| 69堂成人精品免费视频| 欧美一卡2卡3卡4卡| 欧美v亚洲v综合ⅴ国产v| 精品美女一区二区三区| wwwwxxxxx欧美| 中文字幕不卡的av| 亚洲欧美激情一区二区| 亚洲激情第一区| 日韩精品一级二级| 久久超碰97中文字幕| 国产精品456露脸| 成人动漫一区二区三区| 在线观看一区二区精品视频| 欧美性猛交xxxx黑人交| 日韩一级成人av| 久久精品网站免费观看| 国产精品不卡视频| 亚洲电影你懂得| 国内精品在线播放| 99在线精品视频| 欧美综合在线视频| 日韩久久免费av| 日韩毛片在线免费观看| 亚洲不卡一区二区三区| 精品一区二区精品| 99视频有精品| 91.xcao| 久久九九久精品国产免费直播| 中文字幕第一区二区| 亚洲成人你懂的| 国产福利视频一区二区三区| 在线观看免费一区| 26uuu色噜噜精品一区| 亚洲精品ww久久久久久p站 | gogogo免费视频观看亚洲一| 欧美专区亚洲专区| 日韩欧美黄色影院| 亚洲精品国产无天堂网2021| 美国av一区二区| 91国产成人在线| 久久久高清一区二区三区| 亚洲第一搞黄网站| 粉嫩一区二区三区性色av| 7799精品视频| 国产精品成人一区二区三区夜夜夜 | 欧美伦理电影网| 日本一区二区三区四区在线视频| 一区二区三区在线视频免费| 国模一区二区三区白浆| 91激情五月电影| 国产拍揄自揄精品视频麻豆 | 国产一区二区三区四| 欧美性色综合网| 日韩理论电影院| 日韩av一级电影| 在线视频欧美区| 国产精品视频九色porn| 麻豆91精品视频| 欧美日韩免费高清一区色橹橹 | 亚洲一区在线视频观看| 成人蜜臀av电影| 26uuu色噜噜精品一区二区| 五月激情六月综合| 日本道在线观看一区二区| 中文文精品字幕一区二区| 奇米四色…亚洲| 欧美人牲a欧美精品| 亚洲激情网站免费观看| 99久久精品99国产精品 | 26uuu国产在线精品一区二区| 亚洲自拍偷拍九九九| 福利91精品一区二区三区| 日韩一区二区三区电影在线观看 | 国产亚洲成av人在线观看导航| 天天综合色天天综合色h| 色欧美片视频在线观看在线视频| 久久久国产午夜精品| 韩国女主播成人在线| 欧美一区二区观看视频| 午夜电影网一区| 欧美久久久一区| 亚洲成av人片一区二区三区| 在线观看欧美精品| 亚洲日本在线观看| 成人性生交大片| 精品欧美一区二区在线观看| 秋霞午夜鲁丝一区二区老狼| 欧美视频一区二区| 亚洲一区二区在线观看视频| 在线观看日韩国产| 亚洲综合av网| 欧美日本一区二区| 亚洲123区在线观看| 6080国产精品一区二区| 视频一区欧美精品| 欧美日韩精品一区二区三区四区 | 国产欧美一区二区精品忘忧草 | 国产一区二区三区黄视频 | 丝袜亚洲精品中文字幕一区| 91精品国产入口| 久久精品国产77777蜜臀| 欧美精品在线一区二区三区| 一区二区不卡在线播放| 欧美日韩精品系列| 免费人成在线不卡| 2020国产成人综合网| 成人黄色a**站在线观看| 亚洲风情在线资源站| 日韩一区二区视频在线观看| 风间由美一区二区av101| 亚洲成人精品一区二区| 日韩欧美精品在线视频| 成人18精品视频| 日韩精彩视频在线观看| 中文字幕av一区二区三区免费看| 欧美最猛性xxxxx直播| 黄页网站大全一区二区| 亚洲一区二区综合| 国产午夜精品久久久久久久| 欧美日韩在线一区二区| 国产999精品久久久久久绿帽| 亚洲一区在线观看免费观看电影高清 | 日韩av一区二区三区四区| 国产精品美女一区二区三区| 欧美二区乱c少妇| 成人av在线观| 高清日韩电视剧大全免费| 午夜激情一区二区三区| 国产精品剧情在线亚洲| 欧美成人福利视频| 欧美最猛黑人xxxxx猛交| 国产成人av自拍| 麻豆精品一二三| 午夜久久久影院| 亚洲男人的天堂av| 日本一区二区三区免费乱视频| 欧美日韩精品一区二区天天拍小说 | 日本不卡123|