Advertisement
Guest User

Untitled

a guest
Nov 18th, 2012
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <cstdio>
  4. #include <vector>
  5. #include <set>
  6. #include <cstdlib>
  7. #include <ctime>
  8. #include <cmath>
  9. using namespace std;
  10.  
  11. typedef unsigned long long ll;
  12. typedef double ld;
  13. const int N=100000;
  14. ld ans[N];
  15. int main()
  16. {
  17.     ios_base::sync_with_stdio(false);
  18.     freopen("23.a", "r", stdin);
  19.     for(int i=0;i<N;i++)
  20.         cin>>ans[i];
  21.     freopen("painting.out","r",stdin);
  22.     ld x;
  23.     for(int i=0;i<N;i++)
  24.     {
  25.         cin>>x;
  26.         if (fabs(x-ans[i])>1e-4)
  27.             cout<<"WA on seg "<<i+1<<": correct is "<<ans[i]<<", out is "<<x<<"\n";
  28.     }
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement