Submission #3389812
Source Code Expand
#include <iostream> #include <algorithm> #include <cmath> #include <limits> #include <vector> #include <cstdio> #include <bits/stdc++.h> #include <set> #include <map> #include <stdio.h> #include <stack> #include <queue> #include <deque> #include <numeric> #include<bits/stdc++.h> #include <utility> #define ALL(obj) (obj).begin(), (obj).end() #define FOR(i,a,b) for(int i = (a); i < (b); i++) #define RFOR(i,a,b) for(int i = (a); (b) <= i; i--) #define REP(i,n) for(int i = 0; i < (n); i++) #define RREP(i,n) for(int i = n; n <= i; i--) #define ABS(a) ((a < 0) ? ((-1)*(a)) : (a)) #define elif else if #define MOD 1000000007 #define INF (1<<29) using namespace std; using ll = long long; map <int ,int> mpa,mpb; typedef pair<ll, ll> P; priority_queue<P, vector<P>, greater<P>> pque; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); int D,W; cin >> D >> W; char d[]={NNE,NE,ENE,E,ESE,SE,SSE,S,SSW,SW,WSW,W,WNW,NW,NNW,N,C}; int d=112.5; int cnt=0; while(ture){ d%=3600; if(d<=D && D<d+225){ break; }else{ cnt++; } } int n[13]={0.2,1.5,3.3,5.4,7.9,10.7,13.8,17.1,20.7,24.4,28.4,32.6,203}; for(int i=0;i<13;i++){ n[i]*=60; } int q=0 while(true){ if(W<=n[q]{ break; }else{ q++; } } if(q==0){ cnt=16; } cout << d[cnt] << " " << q << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - 風力観測 |
User | arks1225 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1420 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:39:13: error: ‘NNE’ was not declared in this scope char d[]={NNE,NE,ENE,E,ESE,SE,SSE,S,SSW,SW,WSW,W,WNW,NW,NNW,N,C}; ^ ./Main.cpp:39:17: error: ‘NE’ was not declared in this scope char d[]={NNE,NE,ENE,E,ESE,SE,SSE,S,SSW,SW,WSW,W,WNW,NW,NNW,N,C}; ^ ./Main.cpp:39:20: error: ‘ENE’ was not declared in this scope char d[]={NNE,NE,ENE,E,ESE,SE,SSE,S,SSW,SW,WSW,W,WNW,NW,NNW,N,C}; ^ ./Main.cpp:39:24: error: ‘E’ was not declared in this scope char d[]={NNE,NE,ENE,E,ESE,SE,SSE,S,SSW,SW,WSW,W,WNW,NW,NNW,N,C}; ^ ./Main.cpp:39:26: error: ‘ESE’ was not declared in this scope char d[]={NNE,NE,ENE,E,ESE,SE,SSE,S,SSW,SW,WSW,W,WNW,NW,NNW,N,C}; ^ ./Main.cpp:39:30: error: ‘SE’ was not declared in this scope char d[]={NNE,NE,ENE,E,ESE,SE,SSE,S,SSW,SW,WSW,W,WNW,NW,NNW,N,C}; ^ ./Main.cpp:39:33: error: ‘SSE’ was not declared in this ...