Why code giving wrong answer when including #pragma GCC target("avx,avx2,fma")

Правка en1, от vyomgoyal098, 2024-11-22 21:51:11

So I was solving the question https://codeforces.net/contest/1809/problem/B

While submitting I found that using #pragma GCC target("avx,avx2,fma") in giving WA 292802920 check line 4

while this code 292803134 is giving AC when I am not using #pragma GCC target("avx,avx2,fma")

So why is #pragma GCC target("avx,avx2,fma") this casuing issue? As far as I knew, using this the compiler would optimize the code for CPU utilization. But in this code the while using sqrt() function this is giving WA.

Any reason to explain the same???

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский vyomgoyal098 2024-11-22 21:51:11 661 Initial revision (published)