목록문제해결 (2)
Deep Learning study
#include using namespace std; #define FOR(i,a,b) for(int i=a ; i> N >> M >> x >> y >> K; FOR(i,0,N) FOR(j,0,M) cin >> MAP[i][j]; FOR(i,0,K) cin >> order[i]; FOR(i,0,K){ int ord = order[i]; if(ord == 1){ if(y+1>=M) continue; else{ ++y; dice[2] = dice[0]; dice[0] = dice[3]; dice[3] = 7-dice[2]; } }else if(ord == 2){ if(y-1 < 0) continue; else{ --y; dice[3] = dice[0]; dice[0] = dice[2]; dice[2] = 7..
#include using namespace std; const int MAX_V = 502; const int S = 500; const int E = 501; const int INF = (1 0){ f[cur][next] += df; f[next][cur] -= df; return df; } } } return 0; } int main(){ ios_base::sync_with_stdio(false); int N; cin >> N; for(int i=0 ;i> where; if(where == 1){ c[S][i] = INF; adj[i].push_back(S); adj[S].push_back(i); } else if(where == 2){ c[i][E] = INF; adj[i].push_back(E..