제출 #419019

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4190192021-06-06 10:41:43RambaXGorillaOne-Way Streets (CEOI17_oneway)C++11
100 / 100
424 ms39268 KiB
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<map>
#include<utility>
using namespace std;
int N, M, P;
pair <int,int> roads[100010];
pair <int,int> save[100010];
int imps[100010][3];
int dfsCnt = 0;
bool vis[100010];
int dfsNums[100010];
int dfsLows[100010];
int dfsPars[100010];
int cons[100010];
int treePars[100010];
int dirs[100010];
char trans[] = {'L', 'B', 'R'};
vector <int> adjGraph[100010];
vector <int> adjTree[100010];
vector <int> adjCycles[100010];
map < pair <int,int>, int> goBack;
map < pair <int,int>, bool> bridges;
void getBridges(int u){
dfsNums[u] = dfsLows[u] = dfsCnt++;
for(int i = 0;i < adjGraph[u].size();i++){
int v = adjGraph[u][i];
if(dfsNums[v] == -1){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

oneway.cpp: In function 'void getBridges(int)':
oneway.cpp:28:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   28 |     for(int i = 0;i < adjGraph[u].size();i++){
      |                   ~~^~~~~~~~~~~~~~~~~~~~
oneway.cpp: In function 'void getCycles(int, int)':
oneway.cpp:45:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   45 |     for(int i = 0;i < adjCycles[u].size();i++){
      |                   ~~^~~~~~~~~~~~~~~~~~~~~
oneway.cpp: In function 'void getTreePars(int)':
oneway.cpp:53:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   53 |     for(int i = 0;i < adjTree[u].size();i++){
      |                   ~~^~~~~~~~~~~~~~~~~~~
oneway.cpp: In function 'void addTreeDirs(int)':
oneway.cpp:63:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   63 |     for(int i = 0;i < adjTree[u].size();i++){
      |                   ~~^~~~~~~~~~~~~~~~~~~
oneway.cpp: In function 'int main()':
oneway.cpp:72:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   72 |     scanf("%d%d",&N,&M);
      |     ~~~~~^~~~~~~~~~~~~~
oneway.cpp:74:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   74 |         scanf("%d%d",&roads[i].first,&roads[i].second);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
oneway.cpp:88:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   88 |     scanf("%d",&P);
      |     ~~~~~^~~~~~~~~
oneway.cpp:90:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   90 |         scanf("%d%d",&imps[i][0],&imps[i][1]);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...