Poj 1698 Alice & amp; #39; s maximum stream of the Chance split point

Source: Internet
Author: User

Split the day of the week, the qualified edge, and finally count whether the traffic of the settlement point is full. Pay attention to the node number.


# Include
 
  
# Include
  
   
# Include
   
    
# Include
    
     
# Include
     
      
# Include
      # Include
       
         # Include
        
          # Include
         
           # Define eps 1e-12 # define INF 0x7fffffff # define maxn 1000 using namespace std; int n, m; int en; int st, ed; // Source Vertex and sink vertex int dis [maxn]; // dis [I], indicating the number of layers to the origin s int que [999999]; int can [55] [11]; struct edge {int to, c, next ;}; edge e [999999]; int head [maxn]; void add (int a, int B, int c) {e [en]. to = B; e [en]. c = c; e [en]. next = head [a]; head [a] = en ++; e [en]. to = a; e [en]. c = 0; e [en]. next = head [B]; head [B] = en ++;} int bfs () {memset (dis,-1, sizeof (dis )); dis [st] = 0; int front = 0, rear = 0; que [rear ++] = st; while (front
          
           

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.