青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

Reactor Cooling

Time Limit: 5 Seconds      Memory Limit: 32768 KB      Special Judge

The terrorist group leaded by a well known international terrorist Ben Bladen is buliding a nuclear reactor to produce plutonium for the nuclear bomb they are planning to create. Being the wicked computer genius of this group, you are responsible for developing the cooling system for the reactor.

The cooling system of the reactor consists of the number of pipes that special cooling liquid flows by. Pipes are connected at special points, called nodes, each pipe has the starting node and the end point. The liquid must flow by the pipe from its start point to its end point and not in the opposite direction.

Let the nodes be numbered from 1 to N. The cooling system must be designed so that the liquid is circulating by the pipes and the amount of the liquid coming to each node (in the unit of time) is equal to the amount of liquid leaving the node. That is, if we designate the amount of liquid going by the pipe from i-th node to j-th as fij, (put fij = 0 if there is no pipe from node i to node j), for each i the following condition must hold:

fi,1+fi,2+...+fi,N = f1,i+f2,i+...+fN,i

Each pipe has some finite capacity, therefore for each i and j connected by the pipe must be fij <= cij where cij is the capacity of the pipe. To provide sufficient cooling, the amount of the liquid flowing by the pipe going from i-th to j-th nodes must be at least lij, thus it must be fij >= lij.

Given cij and lij for all pipes, find the amount fij, satisfying the conditions specified above.


This problem contains multiple test cases!

The first line of a multiple input is an integer N, then a blank line followed by N input blocks. Each input block is in the format indicated in the problem description. There is a blank line between input blocks.

The output format consists of N output blocks. There is a blank line between output blocks.


Input

The first line of the input file contains the number N (1 <= N <= 200) - the number of nodes and and M - the number of pipes. The following M lines contain four integer number each - i, j, lij and cij each. There is at most one pipe connecting any two nodes and 0 <= lij <= cij <= 10^5 for all pipes. No pipe connects a node to itself. If there is a pipe from i-th node to j-th, there is no pipe from j-th node to i-th.


Output

On the first line of the output file print YES if there is the way to carry out reactor cooling and NO if there is none. In the first case M integers must follow, k-th number being the amount of liquid flowing by the k-th pipe. Pipes are numbered as they are given in the input file.


Sample Input

2

4 6
1 2 1 2
2 3 1 2
3 4 1 2
4 1 1 2
1 3 1 2
4 2 1 2

4 6
1 2 1 3
2 3 1 3
3 4 1 3
4 1 1 3
1 3 1 3
4 2 1 3


Sample Input

NO

YES
1
2
3
2
1
1



Author: Andrew Stankevich
Source: Andrew Stankevich's Contest #1

relable_to_front

只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


posts - 3, comments - 1, trackbacks - 0, articles - 16

Copyright © lenohoo

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            中文国产一区| 亚洲国产一区二区三区a毛片 | 99视频日韩| 欧美一级片久久久久久久| 欧美成人免费视频| 精品av久久久久电影| 亚洲已满18点击进入久久| 91久久国产精品91久久性色| 欧美中在线观看| 国产精品高潮呻吟久久av黑人| 亚洲国产小视频| 免费在线播放第一区高清av| 亚洲国产免费| 亚洲欧洲日本国产| 欧美日本精品一区二区三区| 欧美高清视频一区| 欧美精品在线免费| 免费在线亚洲欧美| 国产欧美日韩综合一区在线播放| 亚洲欧洲一区二区三区| 激情久久久久| 午夜精品亚洲一区二区三区嫩草| 在线欧美福利| 久久精品亚洲一区二区| 亚洲伦理在线免费看| 久久综合久色欧美综合狠狠| 欧美一区2区三区4区公司二百| 牛牛国产精品| 亚洲夫妻自拍| 在线观看国产精品网站| 久久动漫亚洲| 久久久中精品2020中文| 国产精品久久久久久久免费软件 | 亚洲一区日本| 免费在线亚洲欧美| 欧美激情影院| 亚洲精品免费在线观看| 亚洲国产激情| 欧美二区在线| 亚洲专区在线| 日韩一级免费观看| 91久久嫩草影院一区二区| 久久久视频精品| 欧美一级片一区| 国产精品日韩精品欧美精品| 亚洲精品日韩久久| 欧美视频在线观看视频极品| 亚洲一区二区动漫| 久久一二三四| 亚洲精品一线二线三线无人区| 欧美日本高清视频| 久久精品人人| 亚洲一区二区成人| 欧美福利专区| 亚洲小说欧美另类婷婷| 国产一区二区精品在线观看| 久久久一本精品99久久精品66| 91久久精品国产91久久| 午夜欧美视频| 国产一区二区福利| 欧美国产日韩亚洲一区| 一区二区久久| 欧美国产日产韩国视频| 久久综合九色九九| 久久精品一区二区国产| 日韩亚洲欧美一区| 狠狠色丁香久久婷婷综合丁香| 欧美日韩精品免费看| 欧美va天堂在线| 久久激情五月激情| 亚洲免费精品| 欧美激情亚洲一区| 麻豆freexxxx性91精品| 欧美一级片在线播放| 亚洲一区二区三区在线看| 日韩一二三区视频| 9国产精品视频| 亚洲一区二区三区乱码aⅴ| 99re成人精品视频| 一本色道久久99精品综合| 一级日韩一区在线观看| 日韩视频不卡中文| 一个色综合导航| 亚洲欧美在线aaa| 另类酷文…触手系列精品集v1小说| 99综合精品| 性欧美xxxx视频在线观看| 欧美在线亚洲一区| 欧美大片一区二区三区| 欧美大片18| 欧美日韩免费在线观看| 国产精品久久看| 亚洲第一网站| 欧美一区网站| 一本一本久久a久久精品综合妖精 一本一本久久a久久精品综合麻豆 | 亚洲免费av网站| 欧美专区在线| 亚洲欧美成人精品| 免费一级欧美片在线播放| 老司机成人网| 亚洲九九精品| 欧美一区二区三区日韩| 久久婷婷人人澡人人喊人人爽| 久久久久久久尹人综合网亚洲| 久久久激情视频| 国产精品高潮呻吟久久av黑人| 在线激情影院一区| 亚洲影院一区| 亚洲国产视频直播| 亚洲一区二区精品在线观看| 久久久久免费观看| 国产精品久久久久久久浪潮网站 | 欧美精品一区在线发布| 国产精品主播| 午夜在线电影亚洲一区| 亚洲精品国产精品乱码不99 | 欧美麻豆久久久久久中文| 国产一区二区三区精品久久久| aa亚洲婷婷| 国产精品色午夜在线观看| 亚洲人被黑人高潮完整版| 男同欧美伦乱| 久久精品中文字幕一区| 韩日在线一区| 久久久欧美一区二区| 亚洲免费在线| 国产在线播精品第三| 久久久一本精品99久久精品66| 亚洲欧美日韩一区二区在线| 国产精品尤物| 欧美在线免费| 久久频这里精品99香蕉| 亚洲看片免费| 亚洲一区一卡| 精久久久久久久久久久| 欧美成人自拍视频| 欧美日韩高清在线一区| 欧美一区二区三区精品电影| 久久精品网址| 一本色道久久综合狠狠躁篇的优点| 亚洲剧情一区二区| 国产一区在线看| 亚洲国产专区| 国产伦理精品不卡| 欧美成人免费网| 国产日韩欧美中文在线播放| 久久久九九九九| 欧美日韩综合在线| 欧美顶级大胆免费视频| 欧美久久一区| 亚洲高清一区二| 精品成人国产| 欧美在线精品一区| 中文国产亚洲喷潮| 欧美va亚洲va香蕉在线| 久久精品二区三区| 国产精品护士白丝一区av| 亚洲福利在线视频| 亚洲国产成人精品女人久久久| 亚洲欧美美女| 亚洲综合99| 欧美四级在线观看| 亚洲激情综合| 99re国产精品| 最近看过的日韩成人| 亚洲国产精品成人一区二区| 久久久亚洲国产美女国产盗摄| 久久成人免费电影| 国内欧美视频一区二区| 亚洲欧美亚洲| 久久一二三四| 亚洲第一区在线观看| 免费在线欧美黄色| 亚洲清纯自拍| 亚洲女人天堂成人av在线| 欧美午夜不卡在线观看免费 | 久久网站免费| 欧美激情视频一区二区三区在线播放 | 国产欧美成人| 久久精品99无色码中文字幕| 艳妇臀荡乳欲伦亚洲一区| 欧美日韩一区二区三区在线看 | 亚洲一区视频| 久久久亚洲一区| 亚洲精品国产精品国产自| 欧美日韩一区三区四区| 亚洲欧美综合国产精品一区| 免费观看在线综合| 亚洲欧美在线观看| 亚洲级视频在线观看免费1级| 欧美午夜精品电影| 欧美一区二区日韩| 亚洲精品国偷自产在线99热| 久久精品中文字幕免费mv| 亚洲区国产区| 亚洲高清在线| 久久免费高清| 日韩写真在线| 国内精品国产成人| 国产精品久久久久久福利一牛影视|