Submission
# | When | Author | Problem | Language | CPU | Memory | |
---|---|---|---|---|---|---|---|
20843 | 2024-06-09 11:37:13 | AHAMMED_99 | Cheaters | C | 0 ms | 1508 kb | Wrong Answer - 1 |
Source Code
#include <stdio.h> // Function to find and print the order of cheaters void findCheaters(int n, int a[]) { int cheaters[n + 1]; // Array to store the order of cheaters for (int i = 0; i <= n; i++) cheaters[i] = 0; // Initialize all elements to 0 // Iterate through the array 'a' to find the cheaters' order for (int i = 0; i < n; i++) { cheaters[a[i]] = i + 1; // Store the order of each cheater } // Print the order of cheaters for (int i = 1; i <= n; i++) { } } int main() { int t; while (t--) { int n; int a[n]; for (int i = 0; i < n; i++) { } // Function call to find and print the cheaters' order findCheaters(n, a); } return 0; }