Submission #13176

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
131762015-02-01 12:14:54woqja125Shymbulak (IZhO14_shymbulak)C++98
Compilation error
0 ms0 KiB
#include<stdio.h>
#include<vector>
#include<queue>
std::vector<int> map[200001];
int deg[200001];
int n;
int dist[200001], distC[200001];
int v[200001];
int cycles[200001], CC = 0;
long long solve();
int main()
{
int i, x, xx;
scanf("%d", &n);
for(i=1; i<=n; i++)
{
scanf("%d%d", &x, &xx);
map[x].push_back(xx);
map[xx].push_back(x);
deg[x]++;
deg[xx]++;
}
std::queue<int> Q;
for(i=1; i<=n; i++)
{
if(deg[i] == 1)Q.push(i);
distC[i] = 1;
}
while(!Q.empty())
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

shymbulak.cpp: In function ‘int main()’:
shymbulak.cpp:34:20: error: range-based ‘for’ loops are not allowed in C++98 mode
         for(int t :map[x]) if(v[t] == false){ xx=t; break; }
                    ^
shymbulak.cpp:51:20: error: range-based ‘for’ loops are not allowed in C++98 mode
         for(int t: map[xx]) if(!v[t]){ tx = t; break;}
                    ^
shymbulak.cpp:14:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &n);
                    ^
shymbulak.cpp:17:31: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d", &x, &xx);
                               ^