Cod sursa(job #3266558)

Utilizator PsyDuck1914Feraru Rares-Serban PsyDuck1914 Data 9 ianuarie 2025 14:19:36
Problema Amenzi Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 1.5 kb
#include <bits/stdc++.h>

using namespace std;

ifstream f ("amenzi.in");
ofstream g ("amenzi.out");

const int KMAX = 12e3;
const int PMAX = 8e3;
const int NMAX = 150;
const int MMAX = 15e2;
const int TMAX = 35e2;

int n, m, p, k;

vector<pair<int, int>> adj[NMAX+1];
int amenda[NMAX+1][TMAX+1], dp[NMAX+1][TMAX+1];
bool se_poate[NMAX+1][TMAX+1], vis[NMAX+1][TMAX+1];

int main()
{
    
    f >> n >> m >> p >> k;
    
    
    for(int i=1; i<=m; i++){
        
        int a, b, c;
        f >> a >> b >> c;
        
        //cout << a << ' ' << b << ' ' << c << endl;
        
        adj[a].push_back({b, c});
        adj[b].push_back({a, c});
        
        
    }
    
    // for(int i=1; i<=k; i++){
        
    //     int a, b, c;
    //     f >> a >> b >> c;
        
    //     amenda[a][b] = c;
        
    // }
    
    // vis[1][0] = true;
    
    // for(int t=1; t<=TMAX; t++){
        
    //     for(int i=1; i<=n; i++){
            
    //         for(auto [next, timp] : adj[i]){
                
                
    //             if(t - timp >= 0 and vis[i][t - timp]){
                    
    //                 vis[next][t] = 1;
                    
    //                 dp[next][t] = max(dp[next][t], dp[i][t - timp] + amenda[next][t]);
                    
    //             }
                
    //         }
            
    //     }
        
    // }
    
    for(int i=1; i<=p; i++){
        
        int a, b;
        f >> a >> b;
        se_poate[a][b] = true;
        
    }
    

    return 0;
}